fix: resolve errcheck lint issues
This commit is contained in:
1 parent
3d968a1102
commit
dd5e9e61ab
3 files changed
+8
-7
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user