aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 4a5a737..db4d038 100644
--- a/README.md
+++ b/README.md
@@ -21,14 +21,14 @@ if err != nil {
}
defer client.Close()
-subID, ch, err := client.Subscribe("RPCService.log_subscribe", nil)
+sub, err := client.Subscribe("RPCService.log_subscribe", nil)
if err != nil {
log.Fatal(err)
}
-log.Infof("Subscribed successfully: %d\n", subID)
+log.Infof("Subscribed successfully: %d\n", sub.ID)
go func() {
- for notification := range ch {
+ for notification := range sub.Recv() {
log.Infof("Receive new notification: %s\n", notification)
}
}()