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.
pull/576/head
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
1 changed files with 1 additions and 1 deletions

2
doc.go
View File

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