Skip to content

Commit ae1ce2a

Browse files
committed
Fix documentation examples
GODRIVER-374 Change-Id: I7fe2c76a0ae825af5beb9f4d0242239018e173f1
1 parent 98f5b78 commit ae1ce2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/documentation_examples/examples_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package documentation_examples_test
1111

1212
import (
13+
"context"
1314
"testing"
1415

1516
"github.com/mongodb/mongo-go-driver/examples/documentation_examples"
@@ -18,7 +19,7 @@ import (
1819
)
1920

2021
func TestDocumentationExamples(t *testing.T) {
21-
client, err := mongo.NewClient("mongodb://localhost:27017")
22+
client, err := mongo.Connect(context.Background(), "mongodb://localhost:27017", nil)
2223
require.NoError(t, err)
2324

2425
db := client.Database("documentation_examples")

0 commit comments

Comments
 (0)