Update github.com/golangci/golangci-lint to v2 (#1336)

* Update github.com/golangci/golangci-lint to v2

* Handle io.Close()
This commit is contained in:
Hidetake Iwata
2025-05-17 10:05:32 +09:00
committed by GitHub
parent 6e6de231c2
commit a4e614aa85
7 changed files with 218 additions and 157 deletions

View File

@@ -29,7 +29,11 @@ dummy`)), req)
if err != nil {
t.Errorf("could not create a response: %s", err)
}
defer resp.Body.Close()
defer func() {
if err := resp.Body.Close(); err != nil {
t.Errorf("could not close response body: %s", err)
}
}()
transport := &Transport{
Base: &mockTransport{resp: resp},