Top "Mongo-go" questions

Official MongoDB Go driver

Mongo-go-driver get objectID from insert result

After using InsertOne to create a new document, when I return the result I'm getting an array of numbers rather …

json mongodb http go mongo-go
Using mongodb go driver for decoding documents into structs with custom type fields

I'm a beginner in both go and mongodb. I try to decode a DocumentResult into a struct using bson tags, …

mongodb go unmarshalling bson mongo-go
Find all documents in a collection with mongo go driver

I checked out the answer here but this uses the old and unmaintained mgo. How can I find all documents …

mongodb go mongo-go
mongodb-go-driver/bson struct to bson.Document encoding

I'm working with https://github.com/mongodb/mongo-go-driver and currently trying to implement a partial update of such struct type …

mongodb go bson mongo-go
Mongo-Go-Driver Failing to Connect

So I am trying to use https://github.com/mongodb/mongo-go-driver to connect to a mongo database in golang. Here …

database mongodb go database-connection mongo-go
How to filter fields from a mongo document with the official mongo-go-driver

How can I filter fields with the mongo-go-driver. Tried it with findopt.Projection but no success. type fields struct { _id …

mongodb go struct projection mongo-go
Primitive.ObjectID to string in Golang

I am trying to convert type primitive.ObjectID to string type in Go. I am using mongo-driver from go.mongodb.…

string mongodb go objectid mongo-go