fix bodyclose linter
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
parent
085136068a
commit
31eec1f8ab
@ -11,7 +11,6 @@ issues:
|
||||
- exhaustive
|
||||
- gocritic
|
||||
- nilerr
|
||||
- bodyclose
|
||||
- loggercheck
|
||||
- forbidigo
|
||||
- interfacebloat
|
||||
|
||||
@ -243,11 +243,13 @@ func stabilizeError(err error) error {
|
||||
|
||||
var authErr *azidentity.AuthenticationFailedError
|
||||
if errors.As(err, &authErr) {
|
||||
//nolint: bodyclose // False positive, this already a processed body, probably just pointing to a buffer.
|
||||
authErr.RawResponse = redactResponse(authErr.RawResponse)
|
||||
}
|
||||
|
||||
var respErr *azcore.ResponseError
|
||||
if errors.As(err, &respErr) {
|
||||
//nolint: bodyclose // False positive, this already a processed body, probably just pointing to a buffer.
|
||||
respErr.RawResponse = redactResponse(respErr.RawResponse)
|
||||
}
|
||||
|
||||
|
||||
@ -135,6 +135,7 @@ func TestMetricsController(t *testing.T) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
output, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user