refactor(config): fix typos

This commit is contained in:
ayntgl 2022-05-22 21:32:28 +04:00
parent 39923074f2
commit d5c35ec3b0

View file

@ -86,7 +86,7 @@ func (c *Config) Load(path string) error {
return err
}
// If the configuration file does not exist already, create a new file; otherwwise, open the existing file with read-write flag.
// If the configuration file does not exist already, create a new file; otherwise, open the existing file with read-write flag.
f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, os.ModePerm)
if err != nil {
return err
@ -98,7 +98,7 @@ func (c *Config) Load(path string) error {
return err
}
// If the file is empty (the size of the file is zero), write the dedfault configuration to the file.
// If the file is empty (the size of the file is zero), write the default configuration to the file.
if fi.Size() == 0 {
return toml.NewEncoder(f).Encode(c)
}