I think we have run into an issue with mgo with mongo 3.4. A query which works from mongo shell is not working from Mongo golang Code.
This works and removes both the documents
>db.cpes.Remove({"cpeid":{"$in":["11111111111111111111111111111111","22222222222222222222222222222222"]}})
But this golang code doesn't work. It only deletes the document matching the first entry.
coll.Remove(bson.M{"cpeid": bson.M{"$in": []string{cpeids[0], cpeids[1]}}})
I know godoc says "Remove" will delete only one document but is there a way to remove multiple documents in one statement form golang code.
Any one has some idea?
Regards,
Saurabh