lint: fix remaining errcheck for Write, Fprintf, Rollback, Commit

- Use lint.Write for unchecked w.Write in handlerJSONPost/Put, report
- Use lint.Fprintf for fmt.Fprintf in twilio handlers
- Use lint.LogOnErrRollback for deferred Rollbacks in compliance, lead, note
- Check errors from txn.Commit in lead, note
- Use lint.LogOnErrCtx for addError calls in flyover
This commit is contained in:
Eli Ribble 2026-05-09 02:41:49 +00:00
parent 679d12b48f
commit 808e172221
No known key found for this signature in database
7 changed files with 36 additions and 18 deletions

View file

@ -300,7 +300,7 @@ func handlerJSONPost[RequestType any, ResponseType any](f handlerFunctionPost[Re
respondErrorStatus(w, nhttp.NewError("failed to marshal json: %w", err))
return
}
w.Write(body)
lint.Write(w, body)
}
}
@ -323,7 +323,7 @@ func handlerJSONPut[RequestType any, ResponseType any](f handlerFunctionPost[Req
respondErrorStatus(w, nhttp.NewError("failed to marshal json: %w", err))
return
}
w.Write(body)
lint.Write(w, body)
}
}
func handlerFormPost[RequestType any, ResponseType any](f handlerFunctionPostFormMultipart[RequestType, ResponseType]) http.HandlerFunc {