fix(lint): resolve errcheck and bodyclose warnings for golangci-lint v2

This commit is contained in:
Deivid Soto 2026-03-30 23:31:06 +02:00
parent 64d31bf4ed
commit 104820f4fe
7 changed files with 13 additions and 10 deletions

View file

@ -97,7 +97,7 @@ func DownloadFFprobe() (string, error) {
if err != nil {
return "", fmt.Errorf("download failed: %w", err)
}
defer resp.Body.Close()
defer resp.Body.Close() //nolint:errcheck // best-effort close
if resp.StatusCode != http.StatusOK {
return "", fmt.Errorf("download failed: HTTP %d", resp.StatusCode)
@ -167,7 +167,7 @@ func extractFromZip(data []byte, target string) ([]byte, error) {
if err != nil {
return nil, fmt.Errorf("cannot extract %s from archive: %w", target, err)
}
defer rc.Close()
defer rc.Close() //nolint:errcheck // best-effort close
return io.ReadAll(rc)
}
}