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 (#411)
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