Skip to content

Commit

Permalink
Fix some lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mna committed Oct 7, 2023
1 parent 1b9ff12 commit 381e7b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions rehttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
// *http.Client. Go's stdlib will return an error on the first request
// if that's the case, because it requires a RoundTripper that
// implements the CancelRequest method.
//
package rehttp

import (
Expand Down Expand Up @@ -370,7 +369,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
}
// close the disposed response's body, if any
if res != nil {
io.Copy(ioutil.Discard, res.Body)
_, _ = io.Copy(ioutil.Discard, res.Body)
res.Body.Close()
}
cancel() // we're done with this response and won't be returning it, so it's safe to cancel immediately
Expand Down
2 changes: 1 addition & 1 deletion rehttp_server_post17_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestCancelReader(t *testing.T) {
w.WriteHeader(http.StatusOK)
// need a decent number of bytes to make the race case more likely to fail
// https://github.com/go-kit/kit/issues/773
w.Write(make([]byte, 102400))
_, _ = w.Write(make([]byte, 102400))
}))
defer ts.Close()

Expand Down
2 changes: 1 addition & 1 deletion rehttp_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func TestClientRetryWithBody(t *testing.T) {
return
}

io.Copy(w, r.Body)
_, _ = io.Copy(w, r.Body)
}))
defer srv.Close()

Expand Down

0 comments on commit 381e7b3

Please sign in to comment.