📅  最后修改于: 2022-03-11 14:45:00.627000             🧑  作者: Mango
func toDoc(v interface{}) (doc *bson.Document, err error) {
data, err := bson.Marshal(v)
if err != nil {
return
}
err = bson.Unmarshal(data, &doc)
return
}