Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1002 Bytes

README.md

File metadata and controls

43 lines (29 loc) · 1002 Bytes

Easy Mongo

Simple wraper for MongoDB

Go Report Card Go Reference

Features

Installation

You can use go get to get the latest version:

go get -u github.com/BrunoKrugel/easymongo@latest

Usage

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"

Create Client

easyMongo.NewMongoInstance("uri", "db", "collection")

Simple FindOne

filter := bson.D{
    {Key: "id", Value: "123"},
}

easyMongo.NewMongoInstance("uri", "db", "collection").FindOne(filter)