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

use errors.Is() to check for errors #1730

Merged
merged 1 commit into from Jun 21, 2022
Merged

Commits on Jun 16, 2022

  1. use errors.Is() to check for errors

    Since go 1.13 you can wrap errors. This make it no longer possible to
    compare with `==`, instead you have to compare with `errors.Is()`.
    
    I noticed this problem because -h was no longer working after I stared
    wrapping the errors in my custom FlagErrorFunc function.
    Note that this is only a problem when a custom help flag is defined.
    
    Signed-off-by: Paul Holzinger <pholzing@redhat.com>
    Luap99 committed Jun 16, 2022
    Copy the full SHA
    8935a74 View commit details
    Browse the repository at this point in the history