diff options
Diffstat (limited to 'internal/api/http.go')
| -rw-r--r-- | internal/api/http.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/api/http.go b/internal/api/http.go index 8854625..df28c65 100644 --- a/internal/api/http.go +++ b/internal/api/http.go @@ -95,7 +95,7 @@ func (c *BaseClient) PostEmpty(ctx context.Context, path string, headers map[str if err != nil { return fmt.Errorf("request failed: %w", err) } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() if resp.StatusCode < 200 || resp.StatusCode >= 300 { body, _ := io.ReadAll(resp.Body) @@ -126,7 +126,7 @@ func (c *BaseClient) doJSON(req *http.Request, result interface{}) error { if err != nil { return fmt.Errorf("request failed: %w", err) } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() if resp.StatusCode < 200 || resp.StatusCode >= 300 { body, _ := io.ReadAll(resp.Body) |
