diff options
author | Luke Shumaker <lukeshu@datawire.io> | 2022-08-15 21:25:06 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@datawire.io> | 2022-08-16 00:05:37 -0600 |
commit | 67b78f25f76b8ca43d837fb8055ca8e2b06c7d02 (patch) | |
tree | 517343e316a24cb2f07b16d23ccbf04570f4ce7c /errors.go | |
parent | 6476b9ae7019bedd9324786ff47bc25693e01b60 (diff) |
Get borrowed_scanner_test.go passing [ci-skip]
Diffstat (limited to 'errors.go')
-rw-r--r-- | errors.go | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -137,3 +137,16 @@ func (e *EncodeMethodError) Error() string { } func (e *EncodeMethodError) Unwrap() error { return e.Err } + +// reencode errors ///////////////////////////////////////////////////////////////////////////////// + +// A *ReEncodeSyntaxError is returned from ReEncoder's methods if +// there is a syntax error in the input. +type ReEncodeSyntaxError struct { + Err error + Offset int64 +} + +func (e *ReEncodeSyntaxError) Error() string { + return fmt.Sprintf("json: syntax error at input byte %v: %v", e.Offset, e.Err) +} |