Skip to content

Migrate away from errors.Wrap()#250

Merged
vilmibm merged 2 commits intomasterfrom
no-errors-wrap
Jan 23, 2020
Merged

Migrate away from errors.Wrap()#250
vilmibm merged 2 commits intomasterfrom
no-errors-wrap

Conversation

@mislav
Copy link
Copy Markdown
Contributor

@mislav mislav commented Jan 23, 2020

Turns out the "standard" way of wrapping errors in Go is via fmt.Errorf("%w", err), which doesn't require an external package and also allows a finer control of error sentence formatting.

I was the one who hastily suggested errors.Wrap #38 (comment), not noticing that it in fact requires an external package. 🙈

Turns out the "standard" way of wrapping errors in Go is via
`fmt.Errorf("%w")`, which doesn't require an external package and also allows a
finer control of error sentence formatting.
@vilmibm vilmibm merged commit dfed291 into master Jan 23, 2020
@mislav mislav deleted the no-errors-wrap branch January 23, 2020 16:08
mislav pushed a commit that referenced this pull request Jan 23, 2020
Migrate away from `errors.Wrap()`
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.

2 participants