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

Introduce IgnoreAny to be able to ignore more than one type of error #235

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Jan 12, 2021

Signed-off-by: Muvaffak Onus onus.muvaffak@gmail.com

Description of your changes

I needed this to be able to append more ErrorIs functions to generated call from another file. I think even the original Ignore could be deprecated since this one covers it as well but I know it's used in many places so I kept it. Let me know of your thoughts about whether we should deprecate it and use this everywhere instead.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Unit tests.

@muvaf muvaf requested a review from negz January 12, 2021 15:24
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Copy link
Member

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I would be fine with deprecating Ignore

@negz
Copy link
Member

negz commented Jan 12, 2021

I'd slightly prefer to keep the original Ignore. It's simple enough that I don't think it's a maintenance burden to keep, and IgnoreAny as a name makes more sense when you actually pass more than one error.

@muvaf muvaf merged commit 8c0b53e into crossplane:master Jan 12, 2021
@muvaf muvaf deleted the ignore-more branch January 12, 2021 20:04
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