use errors.Is() to check for errors (#1730)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
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.
authored by Paul Holzinger · committed by GitHub · parent ea94a3d · Browse files · 2 files+34 added−1 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diff stats
2 files+34 added−1 removed
- other:+34 added−1 removed