Skip to content

Commit d1532f9

Browse files
authored
Updated step to connecting the Go app to Azure Cosmos DB
Updated step to connecting the Go app to Azure Cosmos DB Previously: c, err := mongo.NewClient(clientOptions) err = c.Connect(ctx) Currently: c, err := mongo.Connect(ctx, clientOptions)
1 parent 929afd4 commit d1532f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

articles/cosmos-db/mongodb/quickstart-go.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ The following snippets are all taken from the `todo.go` file.
7676
7777
clientOptions := options.Client().ApplyURI(mongoDBConnectionString).SetDirect(true)
7878
79-
c, err := mongo.NewClient(clientOptions)
80-
err = c.Connect(ctx)
79+
c, err := mongo.Connect(ctx, clientOptions)
8180
if err != nil {
8281
log.Fatalf("unable to initialize connection %v", err)
8382
}

0 commit comments

Comments
 (0)