refactor: move from io/ioutil to io and os package (#2592)

This commit is contained in:
kekeimiku
2021-09-29 10:33:57 +08:00
committed by GitHub
parent 72a7fd948e
commit 0cee1877e3
19 changed files with 38 additions and 44 deletions

View File

@@ -6,7 +6,6 @@ import (
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
@@ -219,7 +218,7 @@ func (r *Request) sendHTTPRequest(method, urlstr string, host string, headers ma
}
ret := &Response{Code: resp.StatusCode, Header: resp.Header}
buf, err := ioutil.ReadAll(resp.Body)
buf, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}