Answer the question
In order to leave comments, you need to log in
How to make FindOne with a selection of specific fields using the driver's office?
I want something like this:
var user bson.M
users.FindOne(ctx, bson.M{"username": "some"}).SetProjection(bson.M{"username": 1}).Decode(&user)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question