github mongodb/mongo-go-driver v1.5.0
MongoDB Go Driver 1.5.0

latest releases: v1.17.1-cloud1, cloud-1.17-cloud2, vcloud-1.17-cloud1...
3 years ago

The MongoDB Go driver team is pleased to release 1.5.0 of the official Go driver.

This release contains several new features and usability improvements for the driver.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

API Improvements

This release contains a new errors API for the primary mongo package. Users can now detect duplicate key errors, timeouts, and network errors via the mongo.IsDuplicateKeyError, mongo.IsTimeout, and mongo.IsNetworkError functions, respectively. Additionally, a new UpdateByID function has been added to the mongo.Collection type to update a single document with a given _id value.

Client-Side Field Level Encryption Improvements

The Go Driver now supports using GCP and Azure key management services with the client-side field level encryption feature. In addition, AWS key management support has been enhanced to allow authenticating with temporary AWS credentials. See the MongoDB docs for more information about these improvements. Use of client-side field level encryption requires users to install the latest released version of libmongocrypt. Note: This means that existing applications that use this feature will need to upgrade the libmongocrypt dependency when upgrading to this driver version; otherwise, the application will fail to compile. Users can upgrade to the latest development release of libmongocrypt via the OS-specific instructions for macos, Windows, and Linux.

Server Monitoring

Monitoring has now been added for various server events. A ServerMonitor set on a mongo.Client monitors changes on the MongoDB deployment it is connected to and reports the changes in the client's representation of the deployment.

Erroring for Maps as Ordered Arguments

The driver will now error if a map with more than one key is used as a hint option, sort option, or for index creation. This is to prevent unexpected behavior, for example, an index being created with the keys in the wrong order.

Release Notes

For a full list of tickets included in this release, please see the links below:
Projects:

Projects

New Features

Improvements

Bugs

Tasks

Don't miss a new mongo-go-driver release

NewReleases is sending notifications on new releases.