From a3fcbdea3a45a489b2d2cbcac80b25e3c714ee2b Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Thu, 30 Sep 2021 10:27:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BC=98=E5=8C=96=E8=BF=94=E5=9B=9E):=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=8C=87=E9=92=88=EF=BC=8C=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E7=A9=BA=E7=BB=93=E6=9E=84=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tipdw.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tipdw.go b/tipdw.go index 1b9bddd..69a0a96 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 }