Skip to content

Commit 2167689

Browse files
Kumar SaurabhKumar Saurabh
authored andcommitted
discard all the returned values in defer func
1 parent 0320256 commit 2167689

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎api/client.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (c Client) HasScopes(wantedScopes ...string) (bool, string, error) {
216216
defer func() {
217217
// Ensure the response body is fully read and closed
218218
// before we reconnect, so that we reuse the same TCPconnection.
219-
io.Copy(ioutil.Discard, res.Body)
219+
_, _ = io.Copy(ioutil.Discard, res.Body)
220220
res.Body.Close()
221221
}()
222222

0 commit comments

Comments
 (0)