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

Cleanup: use verb %w with fmt.Errorf() when generate new wrapped error from error #832

Merged
merged 1 commit into from
May 17, 2022

Conversation

zhaodiaoer
Copy link
Contributor

What type of PR is this?

/kind good-first-issue

What this PR does / why we need it:

Please read https://github.com/golang/go/wiki/ErrorValueFAQ
After go1.13, it is best to use %w in fmt.Errorf() when generate a new wrapped error from error,
and use errors.Is() or errors.As() when compare between error instance

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

None

other Note

None

@openyurt-bot
Copy link
Collaborator

@zhaodiaoer: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?

/kind good-first-issue

What this PR does / why we need it:

Please read https://github.com/golang/go/wiki/ErrorValueFAQ
After go1.13, it is best to use %w in fmt.Errorf() when generate a new wrapped error from error,
and use errors.Is() or errors.As() when compare between error instance

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

None

other Note

None

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openyurt-bot openyurt-bot added the do-not-merge/work-in-progress do-not-merge/work-in-progress label May 15, 2022
@openyurt-bot
Copy link
Collaborator

Welcome @zhaodiaoer! It looks like this is your first PR to openyurtio/openyurt 🎉

@openyurt-bot openyurt-bot added the size/L size/L: 100-499 label May 15, 2022
@zhaodiaoer zhaodiaoer marked this pull request as ready for review May 15, 2022 12:59
@openyurt-bot openyurt-bot removed the do-not-merge/work-in-progress do-not-merge/work-in-progress label May 15, 2022
pkg/preflight/checks.go Outdated Show resolved Hide resolved
@rambohe-ch
Copy link
Member

@zhaodiaoer Thanks for raising pull request. please fix comment and unit test errors.

@zhaodiaoer
Copy link
Contributor Author

@rambohe-ch Thanks, i have fixed all the buggy usage related to io.EOF and have successfully run the unit tests.

@openyurt-bot openyurt-bot added the approved approved label May 17, 2022
@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rambohe-ch, zhaodiaoer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved lgtm lgtm size/L size/L: 100-499
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants