summaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-14 22:36:25 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-18 22:45:54 -0700
commitdfc67cecbd95344d296c31b537fa3ae8aec8c292 (patch)
tree1e2e820cbd288d1ebef7b0e9dea14a07e2f33fc5 /errors.go
parent38989a9c4f69abfe04c3eb4ec3382be88802141c (diff)
encode, reencode: Fix handling of invalid UTF-8
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/errors.go b/errors.go
index 516018c..da9de4d 100644
--- a/errors.go
+++ b/errors.go
@@ -142,7 +142,8 @@ func (e *EncodeWriteError) Unwrap() error { return e.Err }
type EncodeTypeError = json.UnsupportedTypeError
// An EncodeValueError is returned by Encode when attempting to encode
-// an unsupported value (such as a datastructure with a cycle).
+// an unsupported value (such as a datastructure with a cycle, or (if
+// InvalidUTF8=InvalidUTF8Error) a string with invalid UTF-8).
//
// type UnsupportedValueError struct {
// Value reflect.Value