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.

server returned error on SASL authentication step: Authentication failed

The following is my MongoDB connection dial from GoLang. But it's returning a panic "server returned error on SASL authentication …

mongodb authentication go mgo
How to install golang 3rd-party projects from download sources?

I'm trying to install mgo which is a mongo-driver written in golang. The standard command: go get launchpad.net/mgo …

installation go mgo
Empty or not required struct fields in golang

I'm somewhat new to typed languages like Go and am trying to learn the best ways to implement things. I …

go mgo
How do you select all records from a mongodb collection in golang using mgo

In MongoDB doing something like db.mycollection.find() returns all documents in a collection. When working in GoLang using the …

mongodb go bson mgo
Golang/mgo: How can I ask MongoDB to use current time in a field?

I have this struct that matches the types of a MongoDB collection I'm using: type AppInstance struct { Id bson.ObjectId "_…

mongodb go mgo
Cannot retrieve "_id" value using mgo with golang

This is my struct definition: type Article struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` Title string `json:"title"` …

mongodb go mgo
Best practice to maintain a mgo session

I'm currently using a mongodb with mgo lib for a web application, but I'm not sure if the way I'm …

mongodb go mgo database
How can I query MongoDB with date range using mgo and Go?

Hi I have a collection named "my_sales" having fields product_name, price, sale_date. My doc looks like { "_id" : …

mongodb go mgo
Inserting data into MongoDB with mgo

I'm trying to insert some data in MongoDB using Go. Here is the data struct: type Entry struct { Id string `…

mongodb go mgo
Golang mongodb mgo driver Upsert / UpsertId documentation

The mongodb documentation says: The fields and values of both the and parameters if the parameter contains only update operator …

mongodb go mgo