We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 320c26d commit ef4520fCopy full SHA for ef4520f
source/includes/fundamentals/code-snippets/CRUD/retrieve.go
@@ -101,7 +101,7 @@ func main() {
101
// Retrieves a document that matches the filter and prints it as
102
// a struct
103
var result Tea
104
- err := coll.FindOne(context.TODO(), filter, opts).Decode(&result)
+ err = coll.FindOne(context.TODO(), filter, opts).Decode(&result)
105
if err != nil {
106
if err == mongo.ErrNoDocuments {
107
fmt.Println("No documents found")
0 commit comments