Documentation ¶ Index ¶ func GetIPLocation(reader *maxminddb.Reader, ip, lang string) (string, error) func NewGeo() (*maxminddb.Reader, error) type Location type LocationRes Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetIPLocation ¶ func GetIPLocation(reader *maxminddb.Reader, ip, lang string) (string, error) func NewGeo ¶ func NewGeo() (*maxminddb.Reader, error) Types ¶ type Location ¶ type Location struct { En string `maxminddb:"en"` Zh string `maxminddb:"zh"` } type LocationRes ¶ type LocationRes struct { Iso string `maxminddb:"iso"` Country Location `maxminddb:"country"` Latitude float64 `maxminddb:"latitude"` Longitude float64 `maxminddb:"longitude"` Province Location `maxminddb:"province"` } Source Files ¶ View all Source files geo.go Click to show internal directories. Click to hide internal directories.