Documentation ¶
Index ¶
- func EarthDistance(lat1, lng1, lat2, lng2 float64) float64
- func FormatCityName(city string) string
- func FormatCountryName(country string) string
- func FormatProvinceName(province string) string
- func GetCountryCodeMap() map[string]string
- func GetCountryMap() map[string]Country
- func TestCases()
- type City
- type Country
- type GeoInfo
- type Location
- type Province
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EarthDistance ¶
func FormatCityName ¶
func FormatCountryName ¶
func FormatProvinceName ¶
func GetCountryCodeMap ¶
func GetCountryMap ¶
Types ¶
type GeoInfo ¶
type GeoInfo struct { /* search from ip2region */ Country string `json:"country"` Region string `json:"region"` Province string `json:"province"` City string `json:"city"` ISP string `json:"isp"` /* lookup from our countries.json */ Timezone string `json:"timezone"` Lng float64 `json:"lng"` Lat float64 `json:"lat"` CountryName string `json:"countryName"` CountryCode string `json:"countryCode"` }
func NewGeoFromIp ¶
func NewGeoFromLocation ¶
func (*GeoInfo) CalcDistance ¶
func (*GeoInfo) GetZoneOffset ¶
func (*GeoInfo) LookupGeoInfo ¶
Click to show internal directories.
Click to hide internal directories.