-
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml: typeError implements PrettyPrinter interface
When unmarshalling YAML and encountering an error in decoded that results in a `yaml.typeError`, the error can't have the same nice formatting because it doesn't implement the `errors.PrettyPrinter` interface. This adds a field to the `yaml.typeError` struct that specifies a token which is used in the implementation of the PrettyPrinter interface. The tests were updated to instead match on expected message substrings instead of full equality.
- Loading branch information
Showing
3 changed files
with
71 additions
and
46 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