fix: properly discard resp.Body.Close to avoid lint error

This commit is contained in:
Stevan Freeborn
2026-01-12 18:18:57 -06:00
parent 6e35c0a787
commit 08eb65c8ad
+3 -1
View File
@@ -95,7 +95,9 @@ func (c *Client) do(req *http.Request) error {
return err
}
defer resp.Body.Close()
defer func() {
_ = resp.Body.Close()
}()
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return c.handleAPIError(resp)