matchFilter := bson.D{{Key: "$match",
Value: bson.D{{
Key: "roommates", Value: bson.D{{
Key: "$in", Value: []int{idInt},
Key: "$nin", Value: []int{idInt},
}},
}},
}}
duplicate field name Key in struct literal
db.messages.aggregate([
{
"$match": {
"roommates": {
"$in": [1],
"$nin": []
}
}
}
])
duplicate field name Key in struct literal
matchFilter := bson.D{
bson.E{
Key: "$match",
Value: bson.D{
bson.E{
Key: "roommates",
Value: bson.D{
bson.E{Key: "$in", Value: []int{123}},
bson.E{Key: "$nin", Value: []int{3123}},
},
},
},
},
}