aboutsummaryrefslogtreecommitdiff
path: root/flag.go
diff options
context:
space:
mode:
authorTomas Aschan <[email protected]>2025-09-02 08:08:29 +0200
committerGitHub <[email protected]>2025-09-02 08:08:29 +0200
commit0491e5702ad2bb108bc519a5221bcc0f52aa9564 (patch)
treeebc18802293a1645c75129f464c8be463d3d035c /flag.go
parent72abab1d978352c34a7274f374d30f413e1c83f3 (diff)
parent7e4dfb1e325ce429e29994933210abe53de7041d (diff)
Merge pull request #448 from thaJeztah/fix_go_versionv1.0.10
remove uses of errors.Is, which requires go1.13, move go1.16/go1.21 tests to separate file
Diffstat (limited to 'flag.go')
-rw-r--r--flag.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/flag.go b/flag.go
index 82eced8..2fd3c57 100644
--- a/flag.go
+++ b/flag.go
@@ -1187,7 +1187,7 @@ func (f *FlagSet) Parse(arguments []string) error {
case ContinueOnError:
return err
case ExitOnError:
- if errors.Is(err, ErrHelp) {
+ if err == ErrHelp {
os.Exit(0)
}
fmt.Fprintln(f.Output(), err)
@@ -1216,7 +1216,7 @@ func (f *FlagSet) ParseAll(arguments []string, fn func(flag *Flag, value string)
case ContinueOnError:
return err
case ExitOnError:
- if errors.Is(err, ErrHelp) {
+ if err == ErrHelp {
os.Exit(0)
}
fmt.Fprintln(f.Output(), err)