Skip to content

Commit af3fe31

Browse files
authored
fix: declare err variable inline for startDirWatcher call (#237)
1 parent 7948cb4 commit af3fe31

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/apiserver/pkg/registry/file_rest.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ func NewFileREST(
7878
dirWatcher: sharedWatcher,
7979
fileWatchers: make(map[string]*fileWatch, 10),
8080
}
81-
err = f.startDirWatcher()
82-
if err != nil {
81+
if err := f.startDirWatcher(); err != nil {
8382
return nil, err
8483
}
8584
return f, nil

0 commit comments

Comments
 (0)