-
-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure ParseError.Message is always set
ParseError.Error() did: msg := pe.Message if msg == "" { msg = pe.err.Error() } That was fine, but not very useful for people wanting to access the Message field themselves, especially since err isn't exported. For example staticcheck does this to add in the filename, and the error is lost, because Message is often blank: % staticcheck staticcheck.conf:5:0: (last key parsed: "dot_import_whitelist") (compile) We now only use the err field to determine which error usage to display in ErrorWithUsage()
- Loading branch information
Showing
3 changed files
with
12 additions
and
20 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