Skip to content

Commit

Permalink
Updated README.md for highlighting Go syntax (mongodb#1426)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6c39f4f)
  • Loading branch information
kumarlokesh authored and blink1073 committed Oct 18, 2023
1 parent 29bf861 commit 33c88ef
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 @@ -161,12 +161,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 33c88ef

Please sign in to comment.