oschwald / geoip2-golang

Unofficial MaxMind GeoIP2 Reader for Go
ISC License
1.86k stars 191 forks source link

Exporting getDBType, databaseType and isTYPE constants #76

Closed snebel29 closed 3 years ago

snebel29 commented 3 years ago

I was thinking that would be handy to export getDBType, databaseType and the isTYPE constants to help users discovering databases schema without having to query the databases and looking for InvalidMethodError errors, Would such change be accepted?

oschwald commented 3 years ago

I think I'd prefer to leave the method and constants internal so that they can change as needed and don't create a confusing API. If you are not sure what database you are opening at runtime, you can always use the Metadata() to get the database type.

snebel29 commented 3 years ago

ok, thanks.