unit tests new entities/abc
This commit is contained in:
@@ -55,6 +55,13 @@ func (o One) Peers() []string {
|
||||
return ids
|
||||
}
|
||||
|
||||
func (o One) Generic() bson.M {
|
||||
b, _ := bson.Marshal(o)
|
||||
var m bson.M
|
||||
bson.Unmarshal(b, &m)
|
||||
return m
|
||||
}
|
||||
|
||||
func (o One) MarshalBSON() ([]byte, error) {
|
||||
isMin := fmt.Sprint(o) == fmt.Sprint(o.Query())
|
||||
if !isMin {
|
||||
|
||||
Reference in New Issue
Block a user