Skip to content

Bump github.com/oschwald/maxminddb-golang/v2 from 2.0.0-beta.3 to 2.0.0-beta.5 #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 7, 2025

Bumps github.com/oschwald/maxminddb-golang/v2 from 2.0.0-beta.3 to 2.0.0-beta.5.

Release notes

Sourced from github.com/oschwald/maxminddb-golang/v2's releases.

2.0.0-beta.5

  • Added Offset() method to Decoder to get the current database offset. This enables custom unmarshalers to implement caching for improved performance when loading databases with duplicate data structures.
  • Fixed infinite recursion in pointer-to-pointer data structures, which are invalid per the MaxMind DB specification.

2.0.0-beta-4

  • BREAKING CHANGE: Removed experimental deserializer interface and supporting code. Applications using this interface should migrate to the Unmarshaler interface by implementing UnmarshalMaxMindDB(d *Decoder) error instead.
  • Open and FromBytes now accept options.
  • BREAKING CHANGE: IncludeNetworksWithoutData and IncludeAliasedNetworks now return a NetworksOption rather than being one themselves. These must now be called as functions: Networks(IncludeAliasedNetworks()) instead of Networks(IncludeAliasedNetworks). This was done to improve the documentation organization.
  • Added Unmarshaler interface to allow custom decoding implementations for performance-critical applications. Types implementing UnmarshalMaxMindDB(d *Decoder) error will automatically use custom decoding logic instead of reflection, following the same pattern as json.Unmarshaler.
  • Added public Decoder type and Kind constants in mmdbdata package for manual decoding. Decoder provides methods like ReadMap(), ReadSlice(), ReadString(), ReadUInt32(), PeekKind(), etc. Kind type includes helper methods String(), IsContainer(), and IsScalar() for type introspection. The main maxminddb package re-exports these types for backward compatibility. NewDecoder() supports an options pattern for future extensibility.
  • Enhanced UnmarshalMaxMindDB to work with nested struct fields, slice elements, and map values. The custom unmarshaler is now called recursively for any type that implements the Unmarshaler interface, similar to encoding/json.
  • Improved error messages to include byte offset information and, for the reflection-based API, path information for nested structures using JSON Pointer format. For example, errors may now show "at offset 1234, path /city/names/en" or "at offset 1234, path /list/0/name" instead of just the underlying error message.
  • PERFORMANCE: Added string interning optimization that reduces allocations while maintaining thread safety. Reduces allocation count from 33 to 10 per operation in downstream libraries. Uses a fixed 512-entry cache with per-entry mutexes for bounded memory usage (~8KB) while minimizing lock contention.
Changelog

Sourced from github.com/oschwald/maxminddb-golang/v2's changelog.

2.0.0-beta.5 - 2025-07-06

  • Added Offset() method to Decoder to get the current database offset. This enables custom unmarshalers to implement caching for improved performance when loading databases with duplicate data structures.
  • Fixed infinite recursion in pointer-to-pointer data structures, which are invalid per the MaxMind DB specification.

2.0.0-beta.4 - 2025-07-05

  • BREAKING CHANGE: Removed experimental deserializer interface and supporting code. Applications using this interface should migrate to the Unmarshaler interface by implementing UnmarshalMaxMindDB(d *Decoder) error instead.
  • Open and FromBytes now accept options.
  • BREAKING CHANGE: IncludeNetworksWithoutData and IncludeAliasedNetworks now return a NetworksOption rather than being one themselves. These must now be called as functions: Networks(IncludeAliasedNetworks()) instead of Networks(IncludeAliasedNetworks). This was done to improve the documentation organization.
  • Added Unmarshaler interface to allow custom decoding implementations for performance-critical applications. Types implementing UnmarshalMaxMindDB(d *Decoder) error will automatically use custom decoding logic instead of reflection, following the same pattern as json.Unmarshaler.
  • Added public Decoder type and Kind constants in mmdbdata package for manual decoding. Decoder provides methods like ReadMap(), ReadSlice(), ReadString(), ReadUInt32(), PeekKind(), etc. Kind type includes helper methods String(), IsContainer(), and IsScalar() for type introspection. The main maxminddb package re-exports these types for backward compatibility. NewDecoder() supports an options pattern for future extensibility.
  • Enhanced UnmarshalMaxMindDB to work with nested struct fields, slice elements, and map values. The custom unmarshaler is now called recursively for any type that implements the Unmarshaler interface, similar to encoding/json.
  • Improved error messages to include byte offset information and, for the reflection-based API, path information for nested structures using JSON Pointer format. For example, errors may now show "at offset 1234, path /city/names/en" or "at offset 1234, path /list/0/name" instead of just the underlying error message.
  • PERFORMANCE: Added string interning optimization that reduces allocations while maintaining thread safety. Reduces allocation count from 33 to 10 per operation in downstream libraries. Uses a fixed 512-entry cache with per-entry mutexes for bounded memory usage (~8KB) while minimizing lock contention.
Commits
  • ec9ebd2 Add fuzzing tests for MMDB parsing
  • 6d5f7ab Fix pointer-to-pointer infinite recursion
  • 2a7e2ee Add Offset method to Decoder for caching support
  • 30c2d94 Set release date for 2.0.0-beta.4
  • a5595be Merge pull request #174 from oschwald/dependabot/go_modules/golang.org/x/sys-...
  • 7c0e29d Merge pull request #175 from oschwald/dependabot/github_actions/golangci/gola...
  • 1e9c8e2 Bump golang.org/x/sys from 0.32.0 to 0.33.0
  • 7bc96b9 Bump golangci/golangci-lint-action from 7 to 8
  • 0719621 Add size return to ReadMap and ReadSlice methods
  • 92c2915 Improve MMDB decoding performance by 2.4%
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/oschwald/maxminddb-golang/v2](https://github.com/oschwald/maxminddb-golang) from 2.0.0-beta.3 to 2.0.0-beta.5.
- [Release notes](https://github.com/oschwald/maxminddb-golang/releases)
- [Changelog](https://github.com/oschwald/maxminddb-golang/blob/main/CHANGELOG.md)
- [Commits](oschwald/maxminddb-golang@v2.0.0-beta.3...v2.0.0-beta.5)

---
updated-dependencies:
- dependency-name: github.com/oschwald/maxminddb-golang/v2
  dependency-version: 2.0.0-beta.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Jul 7, 2025
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 7, 2025

Looks like github.com/oschwald/maxminddb-golang/v2 is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Jul 7, 2025
@dependabot dependabot bot deleted the dependabot/go_modules/github.com/oschwald/maxminddb-golang/v2-2.0.0-beta.5 branch July 7, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants