Correct WaitForNotification example

While working on a project that was using this, I tried using the
example code but instead found that WaitForNotification expects a
Context (which makes sense).

This corrects the docs for folks using that as a jumping off point.
This commit is contained in:
Ian Stapleton Cordasco 2019-08-11 08:16:48 -05:00
parent 652d695065
commit 50b92ce0f5
No known key found for this signature in database
GPG Key ID: 656D3395E4A9791A

2
doc.go
View File

@ -225,7 +225,7 @@ notification.
return nil return nil
} }
if notification, err := conn.WaitForNotification(time.Second); err != nil { if notification, err := conn.WaitForNotification(context.TODO()); err != nil {
// do something with notification // do something with notification
} }