1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

Merge pull request #185 from pengux/patch-1

Fix typo in documentation for example of connecting to NATS streaming
This commit is contained in:
Ginger Collison 2020-12-23 12:11:08 -06:00 committed by GitHub
commit 305049e401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ sc, err := stan.Connect(clusterID, clientID)
If the server runs on port `1234`:
```go
sc, err := stan.Connect(clusterID, clientID, stan.NatsURL(“nats://localhost:1234))
sc, err := stan.Connect(clusterID, clientID, stan.NatsURL("nats://localhost:1234"))
```
Sometimes you may want to provide NATS settings that aren't available in the streaming libraries connect method. Or, you may want to reuse a NATS connection instead of creating a new one. In this case the libraries generally provide a way to connect to streaming with an existing NATS connection: