Skip to content

Commit

Permalink
Updated README.md for highlighting Go syntax (#1426)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarlokesh committed Oct 16, 2023
1 parent 757e2a7 commit 6c39f4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ The Go Driver supports the following compression algorithms:

Compression can be enabled using the `compressors` parameter on the connection string or by using [`ClientOptions.SetCompressors`](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo/options#ClientOptions.SetCompressors):

```
```go
opts := options.Client().ApplyURI("mongodb://localhost:27017/?compressors=snappy,zlib,zstd")
client, _ := mongo.Connect(context.TODO(), opts)
```

```
```go
opts := options.Client().SetCompressors([]string{"snappy", "zlib", "zstd"})
client, _ := mongo.Connect(context.TODO(), opts)
```
Expand Down

0 comments on commit 6c39f4f

Please sign in to comment.