Skip to content

Commit d9ed0c0

Browse files
committed
small wip
1 parent 94bab28 commit d9ed0c0

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

source/connect/connection-options/csot.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,15 @@ String` tab to see the corresponding code.
6161
:start-after: start-client-opts
6262
:end-before: end-client-opts
6363
:dedent:
64-
:emphasize-lines: 1
6564

6665
.. tab:: Connection String
6766
:tabid: connection-string
6867

69-
.. literalinclude:: /includes/connect/csot.go
70-
:language: go
71-
:start-after: start-string
72-
:end-before: end-string
73-
:dedent:
68+
.. code-block:: go
69+
:copyable: true
70+
71+
uri := "<connection string>/?timeoutMS=200"
72+
client, err := mongo.Connect(options.Client().ApplyURI(uri))
7473

7574
.. note:: Retries Under Timeout Specification
7675

source/includes/connect/csot.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ func main() {
1616
opts := options.Client().SetTimeout(200 * time.Millisecond)
1717
client, err := mongo.Connect(opts)
1818
// end-client-opts
19-
// start-string
20-
uri := "<connection string>/?timeoutMS=200"
21-
client, err := mongo.Connect(options.Client().ApplyURI(uri))
22-
// end-string
19+
2320
if err != nil {
2421
log.Fatal(err)
2522
}

0 commit comments

Comments
 (0)