fix: resolve errcheck lint issues

This commit is contained in:
user
2026-02-20 03:17:50 -08:00
parent 3d968a1102
commit dd5e9e61ab
3 changed files with 8 additions and 7 deletions

View File

@@ -56,7 +56,7 @@ func (c *Client) do(method, path string, body any) ([]byte, error) {
if err != nil {
return nil, fmt.Errorf("http: %w", err)
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
data, err := io.ReadAll(resp.Body)
if err != nil {
@@ -141,7 +141,8 @@ func (c *Client) PollMessages(afterID string, timeout int) ([]Message, error) {
if err != nil {
return nil, err
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
data, err := io.ReadAll(resp.Body)
if err != nil {