Simple wraper for MongoDB
You can use go get
to get the latest version:
go get -u github.com/BrunoKrugel/easymongo@latest
The following samples will assist you to become as comfortable as possible with easymongo library.
// Import easymongo into your code and refer it as `easymongo`.
import "github.com/BrunoKrugel/easymongo"
easyMongo.NewMongoInstance("uri", "db", "collection")
filter := bson.D{
{Key: "id", Value: "123"},
}
easyMongo.NewMongoInstance("uri", "db", "collection").FindOne(filter)