Skip to content

Go1.13 errors compat#9

Merged
dnephin merged 2 commits intomasterfrom
go1.13-errors-compat
Jul 14, 2020
Merged

Go1.13 errors compat#9
dnephin merged 2 commits intomasterfrom
go1.13-errors-compat

Conversation

@dnephin
Copy link
Copy Markdown
Contributor

@dnephin dnephin commented Jul 13, 2020

The first commit adds an Unwrap to the error type, so that errors created by errwrap can be unwrapped by errors.Is and errors.As.

The second commit adds another case to Walk (which is used by Get/GetAll/Contains/etc) to support the go1.13 wrap interface. This should allow existing packages to start using fmt.Errorf to wrap errors without having to change every errwrap call in a project.

@dnephin dnephin force-pushed the go1.13-errors-compat branch from 07d9576 to 96a78fc Compare July 13, 2020 16:54
@dnephin dnephin marked this pull request as ready for review July 13, 2020 16:58
@dnephin dnephin merged commit 7b00e5d into master Jul 14, 2020
@dnephin dnephin deleted the go1.13-errors-compat branch July 14, 2020 15:51
@dnephin
Copy link
Copy Markdown
Contributor Author

dnephin commented Jul 14, 2020

Thank you!

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