fix: properly discard resp.Body.Close to avoid lint error
This commit is contained in:
@@ -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