Archived
2
0

chore: remove refs to deprecated io/ioutil (#329)

This commit is contained in:
guangwu 2023-08-31 19:32:16 +08:00 committed by GitHub
parent 052a961fd9
commit 7a9b33706a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ package utils
import ( import (
"bytes" "bytes"
"io/ioutil" "io"
"net" "net"
"net/http" "net/http"
"time" "time"
@ -31,7 +31,7 @@ func GetIP(serverUrl string) (string, error) {
} }
defer rsp.Body.Close() defer rsp.Body.Close()
buf, err := ioutil.ReadAll(rsp.Body) buf, err := io.ReadAll(rsp.Body)
if err != nil { if err != nil {
return "", err return "", err
} }