Skip to content

Commit

Permalink
Merge pull request #173 from docwhat/pr/close-watch
Browse files Browse the repository at this point in the history
ensure filehandles are closed
  • Loading branch information
dnephin authored Jan 16, 2021
2 parents 3c47e87 + e4c20b8 commit 22e9314
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/filewatcher/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ func hasGoFiles(path string) bool {
if err != nil {
return false
}
defer fh.Close() // nolint: errcheck // fh is opened read-only

for {
names, err := fh.Readdirnames(20)
Expand Down

0 comments on commit 22e9314

Please sign in to comment.