File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
internal/cmd/compilecheck Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ import (
1212 "go.mongodb.org/mongo-driver/v2/bson"
1313 "go.mongodb.org/mongo-driver/v2/mongo"
1414 "go.mongodb.org/mongo-driver/v2/mongo/options"
15+ "go.mongodb.org/mongo-driver/v2/x/mongo/driver/xoptions"
1516)
1617
1718func main () {
19+ opts := options .Client ()
20+ xoptions .SetInternalClientOptions (opts , "foo" , "bar" )
21+
1822 _ , _ = mongo .Connect (options .Client ())
1923 fmt .Println (bson.D {{Key : "key" , Value : "value" }})
2024}
Original file line number Diff line number Diff line change @@ -287,13 +287,15 @@ type ClientOptions struct {
287287 // encryption.
288288 //
289289 // Deprecated: This option is for internal use only and should not be set (see GODRIVER-2149). It may be
290- // changed or removed in any release.
290+ // changed in any release. This option will be removed in 3.0 and replaced with the Custom options.Options
291+ // pattern: SetInternalClientOptions(clientOptions, "crypt", myCrypt)
291292 Crypt driver.Crypt
292293
293294 // Deployment specifies a custom deployment to use for the new Client.
294295 //
295- // Deprecated: This option is for internal use only and should not be set. It may be changed or removed in any
296- // release.
296+ // Deprecated: This option is for internal use only and should not be set. It may be changed in any release.
297+ // This option will be removed in 3.0 and replaced with the Custom options.Options pattern:
298+ // SetInternalClientOptions(clientOptions, "deployment", myDeployment)
297299 Deployment driver.Deployment
298300
299301 // Custom specifies internal options for the new Client.
Original file line number Diff line number Diff line change 44// not use this file except in compliance with the License. You may obtain
55// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
66
7- package options
7+ package xoptions
88
99import (
1010 "fmt"
Original file line number Diff line number Diff line change 44// not use this file except in compliance with the License. You may obtain
55// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
66
7- package options
7+ package xoptions
88
99import (
1010 "testing"
You can’t perform that action at this time.
0 commit comments