Closed wsw70 closed 1 year ago
The MMDB format allows for storing arbitrary data structures in the database. There isn't one record format. MaxMind has several different record structures for their different databases and other companies provide databases with other record structures. If you are primarily interested in using MaxMind databases, I suggest checking out github.com/oschwald/geoip2-golang
, which uses this library to provide support for the various MaxMind databases. It will be slower than just reading the data you want, but it is easier to get started with.
Thank you very much for the update (and the libraries).
I like your avatar - if this was a pub I would probably go there.
To start with: thank you for this great library, it is really useful. I am an amateur dev so apologies if the question is obvious.
When doing a
.Lookup()
, the data is extracted either intoany
or a struct created manually. Is there a reason why there is no type associated with the result that would encompass all the fields available as a result?In other words, why isn't there a default struct such as the one in the example
with all the available fields?