summaryrefslogtreecommitdiff
path: root/src/pkg/expvar/expvar_test.go
diff options
context:
space:
mode:
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)
}