The MongoDB Go Driver Team is pleased to release version 2.5.0 of the official MongoDB Go Driver.
Release Highlights
This release adds a preview of CRUD support for prefix/suffix/substring indexes. Prefix, suffix and substring search are in preview and should be used for experimental workloads only. These features are unstable and their security is not guaranteed until released as Generally Available (GA). The GA version of these features may not be backwards compatible with the preview version.
Also, this release adds AsFloat64(), AsFloat64OK() to bson.RawValue, and DefaultDocumentMap() to bson.Decoder in the BSON package.
Additionally, this release adds ErrorCodes() to parse server error codes from an arbitrary Go error, and exposes atClusterTime in snapshot sessions.
Moreover, this release fixes several bugs, including potential heap out-of-bounds read in GSSAPI error handling.
What's Changed
✨ New Features
- GODRIVER-3594 Add AsFloat64() and AsFloat64OK() conversion functions by @RafaelCenzano in #2253
- GODRIVER-3690 Add ErrorCodesFrom to the mongo package by @prestonvasquez in #2241
- GODRIVER-3663 Expose atClusterTime parameter in snapshot sessions by @prestonvasquez in #2271
- GODRIVER-3540 Support Prefix/Suffix/Substring Indexes. by @qingyang-hu in #2267
- GODRIVER-3697 Add DefaultDocumentMap as Decoder Method by @prestonvasquez in #2238
🐛 Fixed
- GODRIVER-3698 Support command logging for transactions by @prestonvasquez in #2288
- GODRIVER-3793 Fix variable shadowing and deferred cancel in rttMonitor.start() by @Nepomuk5665 in #2308
- GODRIVER-3770 Fix buffer handling in GSSAPI error description and use… by @prestonvasquez in #2304
📦 Dependency Updates
- Bump github.com/xdg-go/scram from 1.1.2 to 1.2.0 by @dependabot[bot] in #2252
- Bump github.com/klauspost/compress from 1.16.7 to 1.17.6 by @dependabot[bot] in #2229
- GODRIVER-3715 fix: replace golang/snappy with klauspost/compress/snappy by @oikarinen in #2248
- Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.1 in /examples/_logger/logrus by @dependabot[bot] in #2256
- Bump golang.org/x/crypto from 0.36.0 to 0.45.0 in /internal/test/compilecheck by @dependabot[bot] in #2281
- Bump golang.org/x/crypto from 0.33.0 to 0.45.0 in /internal/cmd/faas/awslambda/mongodb by @dependabot[bot] in #2282
- Bump golang.org/x/crypto from 0.33.0 to 0.45.0 in /examples/_logger/zap by @dependabot[bot] in #2280
- Bump golang.org/x/crypto from 0.33.0 to 0.45.0 in /internal/cmd/benchmark by @dependabot[bot] in #2279
- Bump golang.org/x/crypto from 0.33.0 to 0.45.0 in /examples/_logger/logrus by @dependabot[bot] in #2307
- Bump golang.org/x/crypto from 0.33.0 to 0.45.0 in /examples/_logger/zerolog by @dependabot[bot] in #2311
📝 Other Changes
- GODRIVER-3659 Add optin setting to await MinPoolSize population by @prestonvasquez in #2258
- correct spelling by @God-Jay in #2276
- GODRIVER-3502 Refactor and remove builder pattern for MongoCryptOptions by @RafaelCenzano in #2278
- GODRIVER-3517 Convert OIDC prose test to go test by @RafaelCenzano in #2283
- GODRIVER-3702 Add *.mongo.com to OIDC allowed list by @RafaelCenzano in #2284
New Contributors
- @oikarinen made their first contribution in #2248
- @RafaelCenzano made their first contribution in #2253
- @God-Jay made their first contribution in #2276
- @Nepomuk5665 made their first contribution in #2308
Full Changelog: v2.4.2...v2.5.0
For a full list of tickets included in this release, please see the list of fixed issues.
Documentation for the Go Driver can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. For issues with, questions about, or feedback for the Go Driver, please look into our support channels, including StackOverflow. Bugs can be reported in the Go Driver project in the MongoDB JIRA where a list of current issues can be found. Your feedback on the Go Driver is greatly appreciated!