Skip to content

Commit dc6455c

Browse files
author
Divjot Arora
committed
Change nil to bson.D in documentation examples.
GODRIVER-757 Change-Id: Ice9647faaedc235d6ae6915c2a7d46060fa0a461
1 parent e924b48 commit dc6455c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Several query methods return a cursor, which can be used like this:
8585

8686
```go
8787
ctx, _ = context.WithTimeout(context.Background(), 30*time.Second)
88-
cur, err := collection.Find(ctx, nil)
88+
cur, err := collection.Find(ctx, bson.D{})
8989
if err != nil { log.Fatal(err) }
9090
defer cur.Close(ctx)
9191
for cur.Next(ctx) {

mongo/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//
3232
// Several methods return a cursor, which can be used like this:
3333
//
34-
// cur, err := collection.Find(context.Background(), nil)
34+
// cur, err := collection.Find(context.Background(), bson.D{})
3535
// if err != nil { log.Fatal(err) }
3636
// defer cur.Close(context.Background())
3737
// for cur.Next(context.Background()) {

0 commit comments

Comments
 (0)