golang 结构体匿名成员不能用于mgo的tag读取

Go容许咱们定义不带名称的结构体成员,只须要指定类型便可,这种结构体成员称为匿名成员,好比web type Point struct { X int `bson:"x"` Y int `bson:"y"` } type Circle struct { Point Radius int `bson:"redius"` } 这个匿名成员,在json的tag中是能够正常的反序列化的,可是mgo
相关文章
相关标签/搜索