Skip to content

Commit

Permalink
Merge pull request #51 from lalamove/lint
Browse files Browse the repository at this point in the history
linting return err directly
  • Loading branch information
francoispqt authored Jun 18, 2019
2 parents 85dc733 + b4ac065 commit a3a11d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (c *S) RegisterLoaderWatcher(lw LoaderWatcher, loaderHooks ...func(Store) e
}

// RegisterCloser adds a closer to the list of closers.
// Closers are closed when an error occured while reloading a config and the ExitOnError config is set to true
// Closers are closed when an error occurred while reloading a config and the ExitOnError config is set to true
func RegisterCloser(closer io.Closer) Store {
return instance().RegisterCloser(closer)
}
Expand Down
5 changes: 1 addition & 4 deletions parser/kpkeyval/kvparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,5 @@ func (k *Parser) Parse(r io.Reader, cfg konfig.Values) error {
}
cfg.Set(cfgKey[0], strings.Join(cfgKey[1:], k.cfg.Sep))
}
if err := scanner.Err(); err != nil {
return err
}
return nil
return scanner.Err()
}
2 changes: 1 addition & 1 deletion watcher/kwfile/filewatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var defaultRate = 10 * time.Second
type Config struct {
// Files is the path to the files to watch
Files []string
// Rate is the rate at wich the file is watched
// Rate is the rate at which the file is watched
Rate time.Duration
// Debug sets the debug mode on the filewatcher
Debug bool
Expand Down

0 comments on commit a3a11d4

Please sign in to comment.