From cc9df2e87c9fcde8a60626b90c0b26cb6ddab3f0 Mon Sep 17 00:00:00 2001 From: Anmol Sethi <hi@nhooyr.io> Date: Fri, 19 Apr 2019 00:38:11 -0400 Subject: [PATCH] Fix JSON Read example --- README.md | 2 +- example_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 71a5fd8..975aefa 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ jc := websocket.JSONConn{ } var v interface{} -err = jc.Read(ctx, v) +err = jc.Read(ctx, &v) if err != nil { log.Fatalf("failed to read json: %v", err) } diff --git a/example_test.go b/example_test.go index c343d78..16ffba3 100644 --- a/example_test.go +++ b/example_test.go @@ -122,7 +122,7 @@ func ExampleDial() { } var v interface{} - err = jc.Read(ctx, v) + err = jc.Read(ctx, &v) if err != nil { log.Fatalf("failed to read json: %v", err) } -- GitLab