From bb8f9974a8a363f72d57e0bae937eb670ef25670 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Wed, 30 Nov 2022 16:06:46 +0800 Subject: [PATCH] =?UTF-8?q?docs(=E6=9B=B4=E6=96=B0=E6=BC=94=E7=A4=BA):=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=BC=94=E7=A4=BA=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- aipdw.go | 4 ++-- go.mod | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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