- [x] Replace `net.IP` and `*net.IPNet` with `netip.Addr` and `netip.Prefix` - [ ] Update naming and docs to more closely align with `net/netip` - [x] Make `SkipAliasedNetworks` the default when traversing a tree. Almost no one wants the IPv4 information to be repeated in several spots. We will need to deal with https://github.com/oschwald/maxminddb-golang/issues/79 when doing this. - [x] Replace `LookupOffset` with method that returns a struct rather than a `uintptr`. The returned value would have a `Decode(any)` method to replace the current use of `(*Reader).Decode`. Beyond the type safety and reducing the risk of a panic due to programmer error, this would provide the ability to do things like a `DecodePath(result any, path ...any)` that could avoid most of the use of reflection and creating a struct to decode to when looking up a single value. - [x] `(*Reader) Decode` is removed. See above. - [x] After the above changes, reexamine the `Lookup*` methods. Do we really need `Lookup`, `LookupNetwork`, and `LookupOffset` (or whatever the above replacement will be called)? Maybe the `LookupOffset` replacement method from above could replace all of them, although we would have to think about how error handling would work so as not to make it more verbose (e.g., defer returning error from the tree lookup). - [ ] Maybe rename `FromBytes` to `OpenBytes` or something as many people seem to overlook it. - [x] Move decoder to a separate package to make PRs like [this one](https://github.com/oschwald/maxminddb-golang/pull/91) more viable without creating a mess of the `maxminddb` package. - [x] Maybe replace the existing `Networks*` traversal with an iterator. - [ ] Revisit the API for `DecodePath`. Right now, it is hard to tell between a successful lookup and one that didn't find anything. The function could return a sentinel error, but that would be confusing as the other functions do not return that for not-found. Alternatively `(bool, error)` might be sufficient. - [x] Add configuration options to `Open`. I plan to add some caching options in the future, after the v2 release, but for those to not be breaking, we need to add the support for options now. It might make sense to add an option immediately that forces the file to be opened in memory or via mmap, similar to the file-mode options in the Python and Java readers.