From ad046a8e8663a44fb68b30691874bdcc29f83f73 Mon Sep 17 00:00:00 2001 From: Dmitriy Shelikhov Date: Wed, 29 Apr 2020 22:54:23 +0700 Subject: [PATCH] comment: Metro code is US Only --- iputil/geo/geo.go | 1 + 1 file changed, 1 insertion(+) diff --git a/iputil/geo/geo.go b/iputil/geo/geo.go index 6fba74a..4b73729 100644 --- a/iputil/geo/geo.go +++ b/iputil/geo/geo.go @@ -120,6 +120,7 @@ func (g *geoip) City(ip net.IP) (City, error) { if !math.IsNaN(record.Location.Longitude) { city.Longitude = record.Location.Longitude } + // Metro code is US Only https://maxmind.github.io/GeoIP2-dotnet/doc/v2.7.1/html/P_MaxMind_GeoIP2_Model_Location_MetroCode.htm if record.Location.MetroCode > 0 && record.Country.IsoCode == "US" { city.MetroCode = record.Location.MetroCode }