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

address feedback re nil s

This commit is contained in:
Phil Pennock 2019-12-18 17:23:51 -05:00
parent e0ad105373
commit 224888c4a3

View File

@ -9,7 +9,11 @@ For example, to receive JSON you could do:
```go
nc, err := nats.Connect("demo.nats.io",
nats.ErrorHandler(func(nc *nats.Conn, s *nats.Subscription, err error) {
if s != nil {
log.Printf("Async error in %q/%q: %v", s.Subject, s.Queue, err)
} else {
log.Printf("Async error outside subscription: %v", err)
}
}))
if err != nil {
log.Fatal(err)