api: change io.Discard to ioutil.Discard

pull/10473/head
Kyle Nusbaum 3 years ago
parent 1822b80ef3
commit e72a703041

@ -1069,7 +1069,7 @@ func requireOK(d time.Duration, resp *http.Response, e error) (time.Duration, *h
// is necessary to ensure that the http.Client's underlying RoundTripper is able
// to re-use the TCP connection. See godoc on net/http.Client.Do.
func closeResponseBody(resp *http.Response) error {
_, _ = io.Copy(io.Discard, resp.Body)
_, _ = io.Copy(ioutil.Discard, resp.Body)
return resp.Body.Close()
}

Loading…
Cancel
Save