report unknow location for local ip

This commit is contained in:
Shizun Ge 2023-02-11 01:06:16 -08:00
parent c50302622e
commit 374c2b74ad

View file

@ -133,10 +133,12 @@ func geohashAndLocationFromMaxMindDb(address string) (string, string, string, er
latitude = loc.Latitude latitude = loc.Latitude
longitude = loc.Longitude longitude = loc.Longitude
} else { } else {
if iso != "" {
// For debugging, adding the iso to the country name. // For debugging, adding the iso to the country name.
countryName = countryName + " (" + iso + ")" countryName = countryName + " (" + iso + ")"
} }
} }
}
gh := geohash.EncodeAuto(latitude, longitude) gh := geohash.EncodeAuto(latitude, longitude)
country := composeCountry(countryName) country := composeCountry(countryName)
location := composeLocation(countryName, "", cityName) location := composeLocation(countryName, "", cityName)