03_update-user-controllers-post

command
v0.0.0-...-6ea799e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: MIT Imports: 4 Imported by: 0

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)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL