GitHub - mongodb/mongo-go-driver: The Official Golang driver...
Make sure to defer a call toDisconnectafter instantiating your client: deferfunc() {iferr=client.Disconnect(ctx);err!=nil{panic(err) } }() For more advanced configuration and authentication, see thedocumentation