Fix return nil (#15330)
* 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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0eb63475a6
Коммит
94d09e1336
@@ -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.
|
||||
|
||||
Ссылка в новой задаче
Block a user