Hello, may be a silly question, but I found in GitHub there is a version of mongo-go-driver,
and I import the one go.mongodb.org/mongo-driver/
what’s the difference of the two drivers? thanks.
Hello, may be a silly question, but I found in GitHub there is a version of mongo-go-driver,
and I import the one go.mongodb.org/mongo-driver/
what’s the difference of the two drivers? thanks.
Hi,
These are the same thing. go.mongodb.org/mongo-driver
is a redirect to github.com/mongodb/mongo-go-driver
. There’s some information about custom import paths at go command - cmd/go - Go Packages.
– Divjot
Hello Divjot,
We use gitlab build our revision control system which is used only in our company, in this case I should use go.mongodb.org or mongodb · GitHub, or both will work fine.
thanks,
James
You should use go.mongodb.org for all import paths. Your choice of version control system shouldn’t matter for this. Basically, Go will try to fetch the dependencies from go.mongodb.org/mongo-driver
, which will reroute to github.com/mongodb/mongo-go-driver
and it can download the dependencies from there as it needs.
Wow, An answer in 5 minute! Thank you so much!