Skip to content

Releases: oschwald/maxminddb-golang

2.0.0-beta.1

18 Aug 23:47
b8ac5c0
Compare
Choose a tag to compare
2.0.0-beta.1 Pre-release
Pre-release

This is the first beta of the v2 releases. Go 1.23 is required. I don't expect to do a final release until Go 1.24 is available. See #141 for the v2 roadmap.

Notable changes:

  • (*Reader).Lookup now takes only the IP address and returns a Result. Lookup(ip, &rec) would now become Lookup(ip).Decode(&rec).
  • (*Reader).LookupNetwork has been removed. To get the network for a result, use (Result).Prefix().
  • (*Reader).LookupOffset now takes an offset and returns a Result. Result has an Offset() method that returns the offset value. (*Reader).Decode has been removed.
  • Use of net.IP and *net.IPNet have been replaced with netip.Addr and netip.Prefix.
  • You may now decode a particular path within a database record using (Result).DecodePath. For instance, to decode just the country code in GeoLite2 Country to a string called code, you might do something like Lookup(ip).DecodePath(&code, "country", "iso_code"). Strings should be used for map keys and ints for array indexes.
  • (*Reader).Networks and (*Reader).NetworksWithin now return a Go 1.23 iterator of Result values. Aliased networks are now skipped by default. If you wish to include them, use the IncludeAliasedNetworks option.

1.13.1

28 Jun 17:50
616cde2
Compare
Choose a tag to compare
  • Return the *net.IPNet in canonical form when using NetworksWithin to look up a network more specific than the one in the database. Previously, the IP field on the *net.IPNet would be set to the IP from the lookup network rather than the first IP of the network.
  • NetworksWithin will now correctly handle an *net.IPNet parameter that is not in canonical form. This issue would only occur if the *net.IPNet was manually constructed, as net.ParseCIDR returns the value in canonical form even if the input string is not.

1.13.0

03 Jun 02:09
af999f7
Compare
Choose a tag to compare
  • Go 1.21 or greater is now required.
  • The error messages when decoding have been improved. #119

1.12.0

01 Aug 02:50
1f4a262
Compare
Choose a tag to compare
  • The wasi target is now built without memory-mapping support. Pull request
    by Alex Kashintsev. GitHub #114.
  • When decoding to a map of non-scalar, non-interface types such as a
    map[string]map[string]any, the decoder failed to zero out the value for
    the map elements, which could result in incorrect decoding. Reported by
    JT Olio. GitHub #115.

1.11.0

18 Jun 20:49
be65817
Compare
Choose a tag to compare
  • wasm and wasip1 targets are now built without memory-mapping support.
    Pull request by Randy Reddig. GitHub #110.

Full Changelog: v1.10.0...v1.11.0

1.10.0

07 Aug 19:16
86cef18
Compare
Choose a tag to compare
  • Set Go version in go.mod file to 1.18.

1.9.0

26 Mar 17:36
Compare
Choose a tag to compare
  • Set the minimum Go version in the go.mod file to 1.17.
  • Updated dependencies.
  • Minor performance improvements to the custom deserializer feature
    added in 1.8.0.

1.8.0

23 Nov 21:43
52f6238
Compare
Choose a tag to compare
  • Added maxminddb.SkipAliasedNetworks option to Networks and
    NetworksWithin methods. When set, this option will cause the
    iterator to skip networks that are aliases of the IPv4 tree.
  • Added experimental custom deserializer support. This allows
    much more control over the deserialization. The API is
    subject to change and you should use at your own risk.

1.7.0

13 Jun 18:11
2e4624c
Compare
Choose a tag to compare
  • Add NetworksWithin method. This returns an iterator that traverses all networks in the database that are contained in the given network. Pull request by Olaf Alders. GitHub #65.

1.6.0

25 Dec 00:10
Compare
Choose a tag to compare
  • This module now uses Go modules. Requested by Matthew Rothenberg.
    GitHub #49.
  • Plan 9 is now supported. Pull request by Jacob Moody. GitHub #61.
  • Documentation fixes. Pull request by Olaf Alders. GitHub #62.
  • Thread-safety is now mentioned in the documentation. Requested by
    Ken Sedgwick. GitHub #39.
  • Fix off-by-one error in file offset safety check. Reported by Will
    Storey. GitHub #63.