Skip to content

Commit 2bcd97a

Browse files
tfogoskriptble
authored andcommitted
GODRIVER-647 Remove bson.NewDocument from docs
Some examples in the documentation were out of date. Change-Id: Idb2f5cdab205d2f8fcb8920ab75bbf6c679ede96
1 parent d305fc0 commit 2bcd97a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

mongo/cursor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
// defer cur.Close(ctx)
2323
//
2424
// for cur.Next(ctx) {
25-
// elem := bson.NewDocument()
25+
// elem := &bson.D{}
2626
// if err := cur.Decode(elem); err != nil {
2727
// log.Fatal(err)
2828
// }

mongo/doc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
// Foo string
5151
// Bar int32
5252
// }{}
53-
// result := bson.Raw{}
5453
// filter := bson.D{{"hello", "world"}}
5554
// err := collection.FindOne(context.Background(), filter).Decode(&result))
5655
// if err != nil { return err }

0 commit comments

Comments
 (0)