Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Err.Format #38

Merged
merged 1 commit into from
Nov 18, 2018
Merged

fix Err.Format #38

merged 1 commit into from
Nov 18, 2018

Conversation

rogpeppe
Copy link
Contributor

When formatting an error with the %q verb, we'd always see an empty string, where formatting an error with %q should produce a quoted string. Fix this, and also add a default case for verbs we don't understand so we don't end up confused by this again. Note that gopkg.in/check.v1 prints the error string with %q.

Also add some tests and in passing remove a level of indentation from the table in a table-driven test.

Copy link
Contributor

@howbazaar howbazaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch. Thanks @rogpeppe.

@rogpeppe
Copy link
Contributor Author

$$merge$$

@jujubot jujubot merged commit 089d3ea into juju:master Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants