You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ golangci-lint run --enable bodyclose ./...main.go:16:91: response body must be closed (bodyclose) AddValidator(requests.ValidatorHandler(requests.DefaultValidator, requests.ToBytesBuffer(&errResp))).
Interestingly, when removing the net/http import (for example by removing the Method or replacing it with an equivalent string), the issue disappears.
I first reported this to carlmjohnson/requests in this discussion and the package author seemed confident that the response body was indeed closed:
Hello! 👋🏻
The following piece of code triggers
bodyclose
:Interestingly, when removing the
net/http
import (for example by removing theMethod
or replacing it with an equivalent string), the issue disappears.I first reported this to carlmjohnson/requests in this discussion and the package author seemed confident that the response body was indeed closed:
The text was updated successfully, but these errors were encountered: