Skip to content

Commit

Permalink
Support all per-continent databases
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Mar 14, 2017
1 parent c9f3a0c commit 0fd242d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,16 @@ func getDBType(reader *maxminddb.Reader) (databaseType, error) {
case "GeoIP2-Anonymous-IP":
return isAnonymousIP, nil
// We allow City lookups on Country for back compat
case "GeoLite2-City", "GeoIP2-City", "GeoIP2-City-Europe", "GeoIP2-Precision-City",
"GeoLite2-Country", "GeoIP2-Country":
case "GeoLite2-City",
"GeoIP2-City",
"GeoIP2-City-Africa",
"GeoIP2-City-Asia-Pacific",
"GeoIP2-City-Europe",
"GeoIP2-City-North-America",
"GeoIP2-City-South-America",
"GeoIP2-Precision-City",
"GeoLite2-Country",
"GeoIP2-Country":
return isCity | isCountry, nil
case "GeoIP2-Connection-Type":
return isConnectionType, nil
Expand Down

0 comments on commit 0fd242d

Please sign in to comment.