📅  最后修改于: 2022-03-11 14:45:01.512000             🧑  作者: Mango
findOptions := options.Find()
// Sort by `price` field descending
findOptions.SetSort(bson.D{{"price", -1}})
db.Collection("products").Find(nil, bson.D{}, findOptions)