Skip to content

Commit

Permalink
Hint the linter not to complain about unchecked rollback error
Browse files Browse the repository at this point in the history
  • Loading branch information
julieta-311 committed Oct 28, 2023
1 parent 5ecafed commit 4e1f802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (d *db) ExecContext(ctx context.Context, query string, args ...any) (_ sql.
if err != nil {
return nil, fmt.Errorf("failed to begin transaction: %w", err)
}
defer tx.Rollback(ctx)
defer tx.Rollback(ctx) // nolint:errcheck

_, err = tx.Exec(ctx, query, args...)
if err != nil {
Expand Down

0 comments on commit 4e1f802

Please sign in to comment.