aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/v2/example_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/json/v2/example_test.go')
-rw-r--r--src/encoding/json/v2/example_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/encoding/json/v2/example_test.go b/src/encoding/json/v2/example_test.go
index 684ca9c6a2..b95ad0f73c 100644
--- a/src/encoding/json/v2/example_test.go
+++ b/src/encoding/json/v2/example_test.go
@@ -550,8 +550,8 @@ func ExampleWithUnmarshalers_rawNumber() {
if dec.PeekKind() == '0' {
*val = jsontext.Value(nil)
}
- // Return SkipFunc to fallback on default unmarshal behavior.
- return json.SkipFunc
+ // Return ErrUnsupported to fallback on default unmarshal behavior.
+ return errors.ErrUnsupported
}),
))
if err != nil {
@@ -604,8 +604,8 @@ func ExampleWithUnmarshalers_recordOffsets() {
n := len(unread) - len(bytes.TrimLeft(unread, " \n\r\t,:"))
tunnel.ByteOffset = dec.InputOffset() + int64(n)
- // Return SkipFunc to fallback on default unmarshal behavior.
- return json.SkipFunc
+ // Return ErrUnsupported to fallback on default unmarshal behavior.
+ return errors.ErrUnsupported
}),
))
if err != nil {