[GODRIVER-757] README out of date WRT using nil in Find Created: 08/Jan/19  Updated: 28/Oct/23  Resolved: 29/Jan/19

Status: Closed
Project: Go Driver
Component/s: Documentation
Affects Version/s: 0.2.0
Fix Version/s: 0.3.0

Type: Bug Priority: Minor - P4
Reporter: Chunming Li (Inactive) Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by GODRIVER-760 collection.Find(ctx, nil) the query ... Closed
is duplicated by GODRIVER-776 Passing "nil" as a filter Closed

 Description   

README and doc suggested using nil as the filter doc

cur, err := collection.Find(ctx, nil)

However as far as I can tell this will lead to a nil error according to https://github.com/mongodb/mongo-go-driver/blob/80e6fbdb941cebf741d02e5e848585d2d06ee8d2/mongo/collection_internal_test.go#L375-L376



 Comments   
Comment by Githook User [ 29/Jan/19 ]

Author:

{'username': 'divjotarora', 'email': 'divjot.arora@10gen.com', 'name': 'Divjot Arora'}

Message: Change nil to bson.D in documentation examples.

GODRIVER-757

Change-Id: Ice9647faaedc235d6ae6915c2a7d46060fa0a461
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/dc6455ce17e64a5853f4b299398eecb66e95b9e9

Comment by Dylan Parker [ 29/Jan/19 ]

Just noticed there was a dupe of this in Jira. In the event you haven't updated the readme yet I have an open PR for it I'll link below to save you some time. https://github.com/mongodb/mongo-go-driver/pull/134

Generated at Thu Feb 08 08:34:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.