Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Jan 19, 2024
1 parent 079f581 commit 41d722d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion staging/src/k8s.io/code-generator/pkg/fs/gosrc/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ func match(pattern *regexp.Regexp, fp string) bool {
if err != nil {
return false
}
defer f.Close()
defer func() {
if err := f.Close(); err != nil {
panic(err)
}
}()
scanner := bufio.NewScanner(f)
for scanner.Scan() {
if pattern.MatchString(scanner.Text()) {
Expand Down

0 comments on commit 41d722d

Please sign in to comment.