fix(lint): exclude common fire-and-forget patterns from errcheck

This commit is contained in:
Deivid Soto 2026-03-30 23:34:36 +02:00
parent 104820f4fe
commit c0fd8d3818
8 changed files with 25 additions and 12 deletions

View file

@ -97,8 +97,7 @@ func DownloadFFprobe() (string, error) {
if err != nil {
return "", fmt.Errorf("download failed: %w", err)
}
defer resp.Body.Close() //nolint:errcheck // best-effort close
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return "", fmt.Errorf("download failed: HTTP %d", resp.StatusCode)
}
@ -167,7 +166,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() //nolint:errcheck // best-effort close
defer rc.Close()
return io.ReadAll(rc)
}
}