Skip to content

Commit 6c39f4f

Browse files
authored
Updated README.md for highlighting Go syntax (#1426)
1 parent 757e2a7 commit 6c39f4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ The Go Driver supports the following compression algorithms:
162162

163163
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):
164164

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

170-
```
170+
```go
171171
opts := options.Client().SetCompressors([]string{"snappy", "zlib", "zstd"})
172172
client, _ := mongo.Connect(context.TODO(), opts)
173173
```

0 commit comments

Comments
 (0)