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

@ -69,7 +69,7 @@ func (t *WSTransport) Connect(ctx context.Context) error {
conn, wsResp, err := dialer.DialContext(ctx, wsURLWithKey, header)
if wsResp != nil && wsResp.Body != nil {
defer wsResp.Body.Close() //nolint:errcheck
defer wsResp.Body.Close()
}
if err != nil {
return fmt.Errorf("ws dial: %w", err)