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