Skip to content

Commit da99517

Browse files
Merge pull request #107281 from ankur021188/main
Updated step to connecting the Go app to Azure Cosmos DB
2 parents c569070 + d1532f9 commit da99517

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)