Skip to content

Commit 8ddee48

Browse files
authored
Merge pull request #202 from lance6716/patch-1
close file explicitly, to avoid "max open files" error
2 parents cf5d9bf + e6ab97f commit 8ddee48

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

errcheck/errcheck.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ func readfile(filename string) []string {
543543
if err != nil {
544544
return nil
545545
}
546+
defer f.Close()
546547

547548
var lines []string
548549
var scanner = bufio.NewScanner(f)

0 commit comments

Comments
 (0)