From 224ecc42be6a4645f1baff6d836a04c432069bdd Mon Sep 17 00:00:00 2001 From: ehlxr Date: Wed, 24 Jan 2018 17:06:02 +0800 Subject: [PATCH] add ip tools --- README.md | 2 ++ utils/ip/ip.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a572d7c..795d6ae 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,5 @@ common utils for golang - [jbls](utils/jbls): JetBrains license server, Just for test and study, Please support genuine. - [jwt](utils/jwt): This is a simple tool to sign, verify and show JSON Web Tokens ([JWT](http://jwt.io/)) from the command line, base [jwt-go](https://github.com/dgrijalva/jwt-go). + +- [ip](utils/ip): Obtain public IP, check the intranet IP, detect IP type, check IP range, IP address string and int transformation, according to ip to determine the region and operators, etc \ No newline at end of file diff --git a/utils/ip/ip.go b/utils/ip/ip.go index ebf134e..002eb48 100644 --- a/utils/ip/ip.go +++ b/utils/ip/ip.go @@ -62,7 +62,7 @@ func GetIntranetIp() { } } -func TabaoAPI(ip string) *IPInfo { +func TaobaoAPI(ip string) *IPInfo { url := "http://ip.taobao.com/service/getIpInfo.php?ip=" url += ip