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 }