* Fix return nil

A nil error is an interface having nil value but a non-nil type.
This leads to unexpected errors in the code well-documented here:
https://golang.org/doc/faq#nil_error

We fix this by passing an additional parameter to handle it.

Caught using https://github.com/dgryski/semgrep-go

* Bring back auto-generated line
Этот коммит содержится в:
Agniva De Sarker
2020-08-24 11:16:35 +05:30
коммит произвёл GitHub
родитель 0eb63475a6
Коммит 94d09e1336
6 изменённых файлов: 257 добавлений и 253 удалений

Просмотреть файл

@@ -234,7 +234,7 @@ func (fs *FileStore) RemoveFile(name string) error {
return errors.Wrap(err, "failed to remove file")
}
return err
return nil
}
// startWatcher starts a watcher to monitor for external config file changes.