Golang bongo 简单示例
Posted June 28, 2017
创建Connect Config
or
Connect
声明Document, 类似于Model.
type User struct {
Name string `json:"name" bson:"name"`
Email string `json:"email" bson:"email"`
Active bool `json:"active" bson:"active"`
}
type UserDocument struct {
bongo.DocumentBase `bson:",inline"`
User
}
操作, 通过bongo更新一个Document.