Skip to content

BrunoKrugel/easymongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)