diff --git a/myhttp/myhttp.go b/myhttp/myhttp.go index a983d89..e85e237 100644 --- a/myhttp/myhttp.go +++ b/myhttp/myhttp.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "io" "io/ioutil" "net/http" "net/url" @@ -85,7 +86,7 @@ func SendGet(url, params string, obj interface{}) bool { return false } defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { mylog.Error(err) return false