report unknow location for local ip
This commit is contained in:
parent
c50302622e
commit
374c2b74ad
1 changed files with 4 additions and 2 deletions
2
geoip.go
2
geoip.go
|
|
@ -133,10 +133,12 @@ func geohashAndLocationFromMaxMindDb(address string) (string, string, string, er
|
|||
latitude = loc.Latitude
|
||||
longitude = loc.Longitude
|
||||
} else {
|
||||
if iso != "" {
|
||||
// For debugging, adding the iso to the country name.
|
||||
countryName = countryName + " (" + iso + ")"
|
||||
}
|
||||
}
|
||||
}
|
||||
gh := geohash.EncodeAuto(latitude, longitude)
|
||||
country := composeCountry(countryName)
|
||||
location := composeLocation(countryName, "", cityName)
|
||||
|
|
|
|||
Loading…
Reference in a new issue