-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix minor regressions in legacy error strings
The Go 1 compatability document does not guarantee that error strings remain unchanged across Go releases. However, there is a practical benefit to reducing the churn even if this is not a guaranteed property. Adjust the formatting of v1 error strings to better match how they were historically rendered. This does not ensure 100% equivalency with legacy error strings, but does a better job at mostly preserving the exact string. In the jsontext and jsonwire packages, we make changes to assist in the construction legacy error values. We also make syntactic errors returned by the Decoder more consistent regardless of whether they were produced by a ReadValue or ReadToken call. All changes made to jsontext and jsonwire are an improvement, so we are not taking on technical debt in those packages to support legacy error strings. All legacy transformations are kept in the v1 code.
- Loading branch information
Showing
19 changed files
with
221 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.