Top "Mgo" questions

mgo (pronounced as mango) is a MongoDB driver for the Go language that implements a rich and well tested selection of features under a very simple API following standard Go idioms.

How do I create a text index in mongodb with golang and the mgo library?

I'm trying to do a full text search on a collection, but in order to do that I need to …

mongodb go mgo
Golang Bson sort parameters in mgo

I am trying to pass a multiple sort query to the "Sort" parameter of the mgo package (see https://godoc.…

sorting go bson mgo
Golang mongodb remove all items from collection [mgo.v2]

How to remove all items from collection stored in mongodb using GO lang? In mongo console I can use: db.…

mongodb go mgo
Storing nested structs with mgo

I'm trying to build a mongo document from a go struct that is heavily nested, and I'm running into a …

mongodb go mgo
Golang mgo returning value with aggregate $group

How do I get an aggregate query to return field values used in the $group statement. The code: type TheGroup …

mongodb go mongodb-query aggregation-framework mgo
Should I copy session for each operation in mgo?

I want to upsert a list of record, so I have two choice, one just use one session, another copy …

session go mgo
Store Uploaded File in MongoDB GridFS Using mgo without Saving to Memory

noob Golang and Sinatra person here. I have hacked a Sinatra app to accept an uploaded file posted from an …

mongodb go mgo