lint: treat logEvent.AddError as a formatter (#6526)
Also fix a couple of places that called fmt.Sprintf and err.Error() redundantly.
This commit is contained in:
parent
ea564d6e36
commit
e002607f92
|
|
@ -31,6 +31,7 @@ linters-settings:
|
|||
- (github.com/letsencrypt/boulder/log.Logger).AuditInfof
|
||||
- (github.com/letsencrypt/boulder/log.Logger).AuditErrf
|
||||
- (github.com/letsencrypt/boulder/ocsp/responder).SampledError
|
||||
- (github.com/letsencrypt/boulder/web.RequestEvent).AddError
|
||||
staticcheck:
|
||||
# SA1019: Using a deprecated function, variable, constant or field
|
||||
# SA6003: Converting a string to a slice of runes before ranging over it
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ func (wfe *WebFrontEndImpl) writeJsonResponse(response http.ResponseWriter, logE
|
|||
// Don't worry about returning this error because the caller will
|
||||
// never handle it.
|
||||
wfe.log.Warningf("Could not write response: %s", err)
|
||||
logEvent.AddError(fmt.Sprintf("failed to write response: %s", err))
|
||||
logEvent.AddError("failed to write response: %s", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue