JackieLeee / MongoDB-Transaction-in-Golang

This is a nexample on how to use mongo transaction in golang.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is am example how to use mongo transaction in golang. Before we code, we need build mongo replica set.Because the mongo transaction is base the replica set.

How to build mongo replica set?

I think you can find the answer from Google.

After build mongo replica set

we should import mongo-driver for golang

go get -u go.mongodb.org/mongo-driver

About

This is a nexample on how to use mongo transaction in golang.