diff --git a/README.md b/README.md index 0b871a8..ebefcf5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Golang 高德IP定位库 # 在线演示 -- [https://aite.xyz/aipdw](https://aite.xyz/aipdw) +- [https://aite.xyz/demo/aipdw](https://aite.xyz/demo/aipdw) # 类似项目 diff --git a/aipdw.go b/aipdw.go index 649cf56..041392d 100644 --- a/aipdw.go +++ b/aipdw.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "net" "net/http" "sync" @@ -66,7 +66,7 @@ func QueryIP(sk string, key string, ip string) (result Result, err error) { return } defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return } diff --git a/go.mod b/go.mod index a0dd25d..bb224f6 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/xiaoqidun/aipdw -go 1.17 +go 1.19