dev: close errcheck exclude file (#4649)

This commit is contained in:
Oleksandr Redko 2024-04-16 17:45:29 +03:00 committed by GitHub
parent 7ad7949ca9
commit 375fa11cca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -254,6 +254,7 @@ func readExcludeFile(name string) ([]string, error) {
if fh == nil {
return nil, fmt.Errorf("failed reading exclude file: %s: %w", name, err)
}
defer func() { _ = fh.Close() }()
scanner := bufio.NewScanner(fh)