I'm trying to create an aggregate pipeline using the Mgo driver. I keep running into the unknown top level operator $not issue for the following setup. I'm a beginner at using go and mongo. I'm creating this pipeline to filter out users that don't match a certain criteria such as that they are active. Is there any easier way to accomplish this?
today := time.Now()
pipe2 := bson.M{"$match": bson.M{
"$not": []bson.M{
bson.M{StartDate: bson.M{"$gte": today}},
bson.M{EndDate: bson.M{"$lte": today}}}}}