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,8 +133,10 @@ func geohashAndLocationFromMaxMindDb(address string) (string, string, string, er
latitude = loc.Latitude
longitude = loc.Longitude
} else {
// For debugging, adding the iso to the country name.
countryName = countryName + " (" + iso + ")"
if iso != "" {
// For debugging, adding the iso to the country name.
countryName = countryName + " (" + iso + ")"
}
}
}
gh := geohash.EncodeAuto(latitude, longitude)