go-mongodb查询bson

加灰| 阅读:687 发表时间:2023-03-17 15:45:00 linux
("$or", bson.A{ 
bson.D{{"name", bson.D{ {"$regex", pattern}, {"$options", "i"}, }}}, 
bson.D{{"mobile", bson.D{ {"$regex", pattern}, {"$options", "i"}, }}}, 
bson.D{{"corp_name", bson.D{ {"$regex", pattern}, {"$options", "i"}, }}}, 
})