Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Geoname ¶
type Geoname struct { GeonameID int `json:"geonameId"` CountryID string `json:"countryId"` ToponymName string `json:"toponymName"` Population int `json:"population"` CountryCode string `json:"countryCode"` Name string `json:"name"` CountryName string `json:"countryName"` Lat string `json:"lat"` Lng string `json:"lng"` }
Geoname : location geonames struct
type LocationResultData ¶
type LocationResultData struct { ResultCount int `json:"totalResultsCount"` Geonames []Geoname `json:"geonames"` }
LocationResultData : location struct
func New ¶
func New(user string, locationName string) (result LocationResultData, err error)
New creates and returns location struct
func (LocationResultData) GetCoordinates ¶
func (l LocationResultData) GetCoordinates() (string, string)
GetCoordinates returns latitude and longitude
Click to show internal directories.
Click to hide internal directories.