fix: properly discard resp.Body.Close to avoid lint error
This commit is contained in:
1 parent
6e35c0a787
commit
08eb65c8ad
1 file changed
+3
-1
@@ -95,7 +95,9 @@ func (c *Client) do(req *http.Request) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
defer resp.Body.Close()
|
defer func() {
|
||||||
|
_ = resp.Body.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
|
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
|
||||||
return c.handleAPIError(resp)
|
return c.handleAPIError(resp)
|
||||||
|
|||||||
Reference in new issue
Block a user