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

Replace the use of pkg/errors with native error wrapping #2061

Closed
yurishkuro opened this issue Feb 7, 2020 · 1 comment · Fixed by #2073
Closed

Replace the use of pkg/errors with native error wrapping #2061

yurishkuro opened this issue Feb 7, 2020 · 1 comment · Fixed by #2073
Labels
good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement

Comments

@yurishkuro
Copy link
Member

yurishkuro commented Feb 7, 2020

currently we're using errors.Wrap. Since Go 1.13 we can instead use the stdlib

if err != nil {
    return fmt.Errorf("bad thing happend: %w", err)
}
@ghost ghost added the needs-triage label Feb 7, 2020
@yurishkuro yurishkuro changed the title [spring cleaning [spring cleaning] replace the use of pkg/errors with native error wrapping Feb 7, 2020
@yurishkuro yurishkuro added good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement and removed needs-triage labels Feb 7, 2020
@yurishkuro yurishkuro changed the title [spring cleaning] replace the use of pkg/errors with native error wrapping Replace the use of pkg/errors with native error wrapping Feb 7, 2020
@u5surf
Copy link
Contributor

u5surf commented Feb 9, 2020

@yurishkuro
I'll give you a resolve this issue, I experienced the making a resolution of same error-wrapping issue (tektoncd/pipeline#808) using xerrors.
Of course, I know we can wrap with current fmt libraries as you referred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants