diff --git a/.golangci.yml b/.golangci.yml index 741496b..f99a2a3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -31,9 +31,9 @@ linters-settings: run: timeout: 5m - skip-dirs: - - test issues: max-same-issues: 0 exclude-use-default: false + exclude-dirs: + - test diff --git a/pkg/crawler/log.go b/pkg/crawler/log.go index 0fd4b87..3774b02 100644 --- a/pkg/crawler/log.go +++ b/pkg/crawler/log.go @@ -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