From 2a2830c4a68cc0b9e2973ebed2d8fe7f4cededaf Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Thu, 30 Sep 2021 11:08:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81):=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=84=E4=BD=93=E8=80=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E6=8C=87=E9=92=88=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=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 | 4 ++++ tipdw.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bbf4880..078bf01 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Golang 腾讯IP定位库 +# 在线演示 + +- [https://aite.xyz/tipdw](https://aite.xyz/tipdw) + # 接口文档 - [https://lbs.qq.com/FAQ/server_faq.html](https://lbs.qq.com/FAQ/server_faq.html) diff --git a/tipdw.go b/tipdw.go index 69a0a96..1b9bddd 100644 --- a/tipdw.go +++ b/tipdw.go @@ -36,7 +36,7 @@ type Location struct { } // QueryIP 使用腾讯位置服务查询IP -func QueryIP(sk string, key string, ip string) (result *Result, err error) { +func QueryIP(sk string, key string, ip string) (result Result, err error) { arg := &reqLBS{ SK: sk, Path: "/ws/location/v1/ip", @@ -67,6 +67,6 @@ func QueryIP(sk string, key string, ip string) (result *Result, err error) { err = fmt.Errorf("resp code is %d, body is %s", bodyUnmarshal.Status, body) return } - result = &bodyUnmarshal.Result + result = bodyUnmarshal.Result return }