0

Recently I saw that mgo was no longer going to be maintained and I have a recent project with mgo. My question is if there is a problem with that? There are no risks?

andersonqi
  • 27
  • 3

3 Answers3

2

Basically you may continue to use it, but since it's not maintained anymore, that means bugs discovered in it will not be fixed, and new features of MongoDB servers will not get added to it.

If you read the README of the github project (https://github.com/go-mgo/mgo), it lists your options.

The first suggests to use the community supported fork: github.com/globalsign/mgo. This is maintained, support for new features are being added, and it has the same API as the original package.

Since globalsign/mgo has identical API, there is no reason not to switch to it. It will most likely only take to change your imports.

Also note that there is an official MongoDB Go driver under development, it was announced here: Considering the Community Effects of Introducing an Official MongoDB Go Driver. It's project and source code is available here: github.com/mongodb/mongo-go-driver. It's currently in alpha phase, so it's nowhere near production ready (and they don't even have an estimated date when it will be ready). If you need a driver now, globalsign/mgo is the best option at the moment.

Do note that both the official driver and globalsign/mgo are getting support for newest features and additions of the MongoDB server, as an example, both support change streams (it wasn't in the original mgo driver). For details, see: Watch for MongoDB Change Streams

icza
  • 389,944
  • 63
  • 907
  • 827
0

There will be problems if:

  • You want to get some new features in mongodb and current mgo library doesn't support
  • There is a bugs/security issue in mgo library.

That's one of the reason why i'm not using mgo.

Daniel Tran
  • 6,083
  • 12
  • 25
0

There will be an Official MongoDB Go Driver.

GitHub: mongo-go-driver

Forum: mongodb-go-driver

Considering the Community Effects of Introducing an Official MongoDB Go Driver

peterSO
  • 158,998
  • 31
  • 281
  • 276