Skip to content

grearter/mongo_mock_go_example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mongo Mock example in Go

This repository contains a simple way to mock Mgo driver.

If you're interested in it, you can find an article here : http://thylong.com/golang/2016/mocking-mongo-in-golang/

Installing

$ git clone [email protected]:thylong/mongo_mock_go_example.git

Quick-start

If you want to test only the mock, you can run it this way :

$ go get github.com/thylong/mongo_mock_go_example
$ go run main.go

If you want to test both the connection to Mongo and the mock, you can use the docker-compose file.

Nota Bene

The code was tested with versions 1.7.* of Go.

Releases

No releases published

Packages

No packages published

Languages

  • Go 92.8%
  • Dockerfile 7.2%