File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change 11# go-mongodb-client
22
3- A simple utility Go package for connecting to Mongodb. This package has following features:
4- 1 . Connecting to mongodb client.
5- 2 . Creating new database once the mongodb client is connected.
3+ A simple utility Go package for connecting to MongoDB.
4+ This package provides the following features:
5+
6+ 1 . Connecting to a MongoDB client.
7+ 2 . Creating a new database once the MongoDB client is connected.
683 . Creating collections inside the database.
79
8- ## Install
10+ ---
11+
12+ ## 📦 Installation
913
1014``` bash
1115go get github.com/amitjangid80/go-mongodb-client@latest
16+
17+
18+ import (
19+ " github.com/amitjangid80/go-mongodb-client/mongodb_client"
20+ )
21+
22+ func main () {
23+ mongodbConfig := mongodb_client.MongodbConfig{
24+ Username: " your_mongo_db_username" ,
25+ Password: " your_mongodb_password" ,
26+ Host: " localhost" ,
27+ Port: " your_mongodb_port" ,
28+ DbName: " your_db_name" ,
29+ }
30+
31+ mongodb_client.ConnectDb(& mongodbConfig)
32+ }
You can’t perform that action at this time.
0 commit comments