From e87c9b4d8b629f5df19e9dd182162889d279b4f2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 28 Jan 2023 23:26:26 -0700 Subject: encode: Fix errors for marshalers/encodables with bad output --- errors.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'errors.go') diff --git a/errors.go b/errors.go index d36fc83..fe48723 100644 --- a/errors.go +++ b/errors.go @@ -138,8 +138,9 @@ type EncodeTypeError = json.UnsupportedTypeError // } type EncodeValueError = json.UnsupportedValueError -// An EncodeMethodError wraps an error that is returned from an -// object's method when encoding that object to JSON. +// An EncodeMethodError either wraps an error that is returned from an +// object's method when encoding that object to JSON, or wraps a +// *ReEncodeSyntaxError for the method's output. type EncodeMethodError struct { Type reflect.Type // The Go type that the method is on SourceFunc string // The method: "EncodeJSON", "MarshalJSON", or "MarshalText" -- cgit v1.2.3-2-g168b