Skip to content

Commit

Permalink
fix new issues with golangci lint
Browse files Browse the repository at this point in the history
  • Loading branch information
atomicptr committed May 26, 2024
1 parent 8afab55 commit d0d658d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ linters-settings:

run:
timeout: 5m
skip-dirs:
- test

issues:
max-same-issues: 0
exclude-use-default: false
exclude-dirs:
- test
7 changes: 6 additions & 1 deletion pkg/crawler/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ func (c *Crawler) writeLineToFile(message, filePath string) {
if err != nil {
log.Fatal(err)
}
defer file.Close()
defer func() {
err := file.Close()
if err != nil {
log.Fatal(err)
}
}()

data := struct {
Err string
Expand Down

0 comments on commit d0d658d

Please sign in to comment.