aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/jsontext/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/json/jsontext/state.go')
-rw-r--r--src/encoding/json/jsontext/state.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/encoding/json/jsontext/state.go b/src/encoding/json/jsontext/state.go
index 538dfe32bf..e93057a34c 100644
--- a/src/encoding/json/jsontext/state.go
+++ b/src/encoding/json/jsontext/state.go
@@ -24,7 +24,8 @@ import (
// The name of a duplicate JSON object member can be extracted as:
//
// err := ...
-// if serr, ok := errors.AsType[jsontext.SyntacticError](err); ok && serr.Err == jsontext.ErrDuplicateName {
+// serr, ok := errors.AsType[*jsontext.SyntacticError](err)
+// if ok && serr.Err == jsontext.ErrDuplicateName {
// ptr := serr.JSONPointer // JSON pointer to duplicate name
// name := ptr.LastToken() // duplicate name itself
// ...