Skip to content

Commit

Permalink
fix: 使用第三方 API 不显示 ISP 或域名
Browse files Browse the repository at this point in the history
  • Loading branch information
sjlleo committed Sep 20, 2022
1 parent 62e877e commit 5b91fac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ipgeo/ipapicom.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ func IPApiCom(ip string) (*IPGeoData, error) {
Country: res.Get("country").String(),
City: res.Get("city").String(),
Prov: res.Get("regionName").String(),
Isp: res.Get("isp").String(),
Owner: res.Get("isp").String(),
}, nil
}
2 changes: 1 addition & 1 deletion ipgeo/ipinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ func IPInfo(ip string) (*IPGeoData, error) {
Country: country,
City: res.Get("city").String(),
Prov: res.Get("region").String(),
Isp: res.Get("asn").Get("domain").String(),
Owner: res.Get("asn").Get("domain").String(),
}, nil
}
2 changes: 1 addition & 1 deletion ipgeo/ipsb.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ func IPSB(ip string) (*IPGeoData, error) {
Country: res.Get("country").String(),
City: res.Get("city").String(),
Prov: res.Get("region").String(),
Isp: res.Get("isp").String(),
Owner: res.Get("isp").String(),
}, nil
}

0 comments on commit 5b91fac

Please sign in to comment.