type User struct {
Name string
Phone string
Fkey mgo.DBRef
}
user := User{Name: "abc", Phone: "1234"}
user.Fkey = mgo.DBRef{
Collection: xxx,
Id: xxx,
Database: xxx,
}
以上只是用法示例
type User struct {
Name string
Phone string
Fkey mgo.DBRef
}
user := User{Name: "abc", Phone: "1234"}
user.Fkey = mgo.DBRef{
Collection: xxx,
Id: xxx,
Database: xxx,
}
以上只是用法示例