diff options
Diffstat (limited to 'lib/math/big/rat_example_test.go')
| -rw-r--r-- | lib/math/big/rat_example_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/math/big/rat_example_test.go b/lib/math/big/rat_example_test.go index c78f132b..d1669765 100644 --- a/lib/math/big/rat_example_test.go +++ b/lib/math/big/rat_example_test.go @@ -414,7 +414,7 @@ func ExampleRat_MarshalJSON() { func ExampleRat_MarshalJSON_withStruct() { type T struct { - V *Rat + V *Rat `json:"V"` } inputs := []T{ @@ -430,7 +430,7 @@ func ExampleRat_MarshalJSON_withStruct() { ) MarshalJSONAsString = true for _, in = range inputs { - out, err = json.Marshal(in) + out, err = json.Marshal(&in) if err != nil { log.Fatal(err) } |
