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

*: switch from pkg/errors to Go 1.13+ error wrapping #85

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

kolyshkin
Copy link
Contributor

The conversion was mostly done using the wonderful go-wrap-to-percent-w tool by @AkihiroSuda.

The manual parts were:

  1. Replacing errors.Cause with errors.Is.

  2. Auditing returned errors to not provide extra context (e.g. os.Open
    and ioutils.ReadFile already have the failed operation (open, read
    etc.) and the file name in the error message).

  3. Changing go.mod to specify 1.13 (as this is the version that
    introduced the features used here).

  4. make vendor.

The conversion was mostly done using the go-wrap-to-percent-w tool.

The manual parts were:

1. Replacing errors.Cause with errors.Is.

2. Auditing returned errors to not provide extra context (e.g. os.Open
   and ioutils.ReadFile already have the failed operation (open, read
   etc.) and the file name in the error message).

3. Changing go.mod to specify 1.13 (as this is the version that
   introduced the features used here).

4. make vendor.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Loving it, thank you, @kolyshkin (and @AkihiroSuda).

@giuseppe PTAL

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@vrothberg vrothberg merged commit e433993 into containers:main Sep 3, 2021
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