From 50b92ce0f591145c4b3da1c1e8fb9d98db845ebb Mon Sep 17 00:00:00 2001 From: Ian Stapleton Cordasco Date: Sun, 11 Aug 2019 08:16:48 -0500 Subject: [PATCH] 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. --- doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.go b/doc.go index 5808c09d..0c2b35d3 100644 --- a/doc.go +++ b/doc.go @@ -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 }