package
0.0.0-20240401142834-ab19c838fe5a
Repository: https://github.com/marcelo-feliz/golang.git
Documentation: pkg.go.dev
# README
Don't run this code yet
We create an ObjectId using the bson package.
We do this in controllers/user.go in func CreateUser
// create bson ID
u.Id = bson.NewObjectId()
Second, we store the user in mongodb.
We do this in controllers/user.go in func CreateUser
uc.session.DB("go-web-dev-db").C("users").Insert(u)