philippgille / gokv

Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)
Mozilla Public License 2.0
724 stars 68 forks source link

Migrate MongoDB client from unmaintained 3rd party library to official one #165

Closed philippgille closed 8 months ago

philippgille commented 8 months ago

When gokv was started, the 3rd-party library github.com/globalsign/mgo was the most popular and mature MongoDB client library for Go. But that changed and the official library go.mongodb.org/mongo-driver is now the proper go-to library. mgo is not maintained anymore and seems to not be compatible with newer versions of the MongoDB server anymore.

This PR updates the MongoDB library from github.com/globalsign/mgo to go.mongodb.org/mongo-driver.

I haven't tested the new gokv implementation with an older MongoDB server version (where mgo still worked), but from the way of how the document is defined, inserted/updated, read and deleted it could be compatible.

I'll add a breaking change notice to the CHANGELOG as a warning in any case. (separately)

codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0e6beda) 60.56% compared to head (6f1def7) 63.64%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #165 +/- ## ========================================== + Coverage 60.56% 63.64% +3.08% ========================================== Files 25 25 Lines 2097 2107 +10 ========================================== + Hits 1270 1341 +71 + Misses 716 651 -65 - Partials 111 115 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.