summaryrefslogtreecommitdiff
path: root/src/pkg/expvar/expvar_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-04-21 16:40:53 -0700
committerRuss Cox <rsc@golang.org>2010-04-21 16:40:53 -0700
commitb5c7ab099f6f6712a4f95da09d71d0ab378f6431 (patch)
tree658ed98c6804a2d8e11b7ea023ac07d7820299ae /src/pkg/expvar/expvar_test.go
parent857111428bbbeef6a845399f49c9f113db6bbfde (diff)
downloadgolang-b5c7ab099f6f6712a4f95da09d71d0ab378f6431.tar.gz
json: Marshal, Unmarshal using new scanner
R=r CC=golang-dev http://codereview.appspot.com/953041
Diffstat (limited to 'src/pkg/expvar/expvar_test.go')
-rw-r--r--src/pkg/expvar/expvar_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/expvar/expvar_test.go b/src/pkg/expvar/expvar_test.go
index 2dc399e7d..98cd9c2ea 100644
--- a/src/pkg/expvar/expvar_test.go
+++ b/src/pkg/expvar/expvar_test.go
@@ -61,7 +61,8 @@ func TestMapCounter(t *testing.T) {
// colours.String() should be '{"red":3, "blue":4}',
// though the order of red and blue could vary.
s := colours.String()
- j, err := json.Decode(s)
+ var j interface{}
+ err := json.Unmarshal([]byte(s), &j)
if err != nil {
t.Errorf("colours.String() isn't valid JSON: %v", err)
}