Documentation ¶
Overview ¶
Package iplocation detects your location based on your IP.
Index ¶
Constants ¶
View Source
const URL = "http://ip-api.com/json"
URL points to the location of the IP locale info API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { Status string `json:"status"` Country string `json:"country"` CountryCode string `json:"countryCode"` Region string `json:"region"` RegionName string `json:"regionName"` City string `json:"city"` Zip string `json:"zip"` Lat float64 `json:"lat"` Lon float64 `json:"lon"` Timezone string `json:"timezone"` ISP string `json:"isp"` ORG string `json:"org"` AS string `json:"as"` Message string `json:"message"` Query string `json:"query"` }
Data will hold the result of the query to get the IP address of the caller.
Click to show internal directories.
Click to hide internal directories.