diff --git a/main.go b/main.go index 03d785c..eb67a08 100644 --- a/main.go +++ b/main.go @@ -91,18 +91,8 @@ func parse(binary []byte) (metadata maxminddb.Metadata, countryMap map[string][] if err != nil { return } - var code string - if country.Country.IsoCode != "" { - code = strings.ToLower(country.Country.IsoCode) - } else if country.RegisteredCountry.IsoCode != "" { - code = strings.ToLower(country.RegisteredCountry.IsoCode) - } else if country.RepresentedCountry.IsoCode != "" { - code = strings.ToLower(country.RepresentedCountry.IsoCode) - } else if country.Continent.Code != "" { - code = strings.ToLower(country.Continent.Code) - } else { - continue - } + // idk why + code := country.RegisteredCountry.IsoCode countryMap[code] = append(countryMap[code], ipNet) } err = networks.Err()