api: change io.Discard to ioutil.Discard

This commit is contained in:
Kyle Nusbaum 2021-06-23 11:45:20 -05:00
parent 1822b80ef3
commit e72a703041
1 changed files with 1 additions and 1 deletions

View File

@ -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()
}