Skip to content
The MongoDB driver for Go. See http://labix.org/mgo for details.
Branch: v2
Clone or download
Pull request Compare This branch is 44 commits ahead, 5 commits behind go-mgo:v2.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.evergreen add empty evergreen file. Mar 1, 2017
bson Add support for marshaling to/from mongo-go-driver/bson Sep 13, 2018
dbtest Merge v2-unstable into v2. Feb 4, 2016
harness orchestration: don't try to create SCRAM-SHA-256 credentials before 4.0 Jun 1, 2018
internal MGO-131: Added whitespace trimming of keys in json decoder Mar 16, 2017
txn Merge v2-unstable into v2. Aug 1, 2016
.gitignore gitignore _harness Mar 21, 2018
.travis.yml MGO-155 NoCursorTimeout is not respected for findCmd (#22) Dec 12, 2018
LICENSE The "out" option in the MapReduce command must be ordered. This was Sep 4, 2013
Makefile Rename testdb to harness. Mar 3, 2016
README.md MGO-150 Fix mgo test orchestration Mar 17, 2018
auth.go MGO-154 Don't SASLprep usernames Apr 25, 2018
auth_test.go MGO-154 Don't SASLprep usernames Apr 25, 2018
bulk.go Merge v2-unstable into v2. Feb 4, 2016
bulk_test.go Merge v2-unstable into v2. Feb 4, 2016
changestreams.go MGO-142 implement changestream status functions for err, close and Sep 15, 2017
cluster.go
cluster_test.go MGO-150 Fix tests for recent MongoDB versions Mar 17, 2018
doc.go Document that Session is concurrency safe. Sep 30, 2015
export_test.go Expose pool limit setting via Session.SetPoolLimit. Jul 21, 2014
gridfs.go Merge v2-unstable into v2. Aug 1, 2016
gridfs_test.go Preparing release of v2 r2015.01.24. Jan 24, 2015
log.go mgo: optimize seeking to end of GridFS file Aug 12, 2014
queue.go go fmt Jun 17, 2013
queue_test.go Move package to gopkg.in. Jul 16, 2014
raceoff.go mgo: optimize seeking to end of GridFS file Aug 12, 2014
raceon.go Add missing files defining raceDetector. Jul 1, 2014
saslimpl.go Merge v2-unstable into v2. May 29, 2015
saslstub.go Experimental SASL support. Mar 12, 2014
server.go MGO-145 - Prefer channel communication to stop pinger goroutine early Nov 22, 2017
session.go MGO-162 Fix index key panic for int32/int64 values Mar 8, 2019
session_test.go MGO-162 Fix index key panic for int32/int64 values Mar 8, 2019
socket.go MGO-157 Drain replyFuncs in a separate goroutine Jun 8, 2018
stats.go Add number of clusters alive to statistics, and add leak check to suite. Jun 17, 2013
suite_test.go MGO-150 Fix mgo test orchestration Mar 17, 2018
syscall_test.go Drop panic making the test suite not run on windows. Sep 18, 2014
syscall_windows_test.go Drop panic making the test suite not run on windows. Sep 18, 2014

README.md

The MongoDB driver for Go

Please go to http://labix.org/mgo for all project details.

Testing

Tests require custom orchestration. Install daemontools as a prerequisite and make sure mongod and mongos are in your path. To start the orchestration:

$ export PATH=/path/to/mongodb/bin:$PATH
$ make startdb

To stop the orchestration:

$ make stopdb

Run all tests like this (gocheck.v turns on verbose output):

$ go test -gocheck.v

To run a specific test, use the gocheck.f flag:

$ go test -gocheck.v -gocheck.f TestFindAndModifyBug997828
You can’t perform that action at this time.