Installing the MongoDB Go Driver
Resources
https://docs.mongodb.com/drivers/go/current/
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/
go get go.mongodb.org/mongo-driver/mongo
To get started with the driver, import the mongo
package, create a mongo.Client
:
import ( "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" ) client, err := mongo.NewClient(options.Client().ApplyURI("mongodb://localhost:27017"))