diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-06-08 14:19:11 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-06-08 14:58:24 +0900 |
| commit | f869ff95a12756de97827b4afd93763f9661f144 (patch) | |
| tree | 6f5445ae623f44ceb99c8f7ddb5bb4cd1fb04aa0 /command | |
| parent | 725f2e0ef3eaba1ad46b597604a684125ab93911 (diff) | |
all: apply modernisers
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'command')
| -rw-r--r-- | command/parse.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/command/parse.go b/command/parse.go index 8e21433c..1a3f2ce3 100644 --- a/command/parse.go +++ b/command/parse.go @@ -91,8 +91,8 @@ func (n *node) MustParse(arguments []string, handleError func(error)) { case ErrEmptyTree: os.Exit(1) default: - var flagError FlagError - if !errors.As(err, &flagError) { // returned by HandlerFunc + flagError, ok := errors.AsType[FlagError](err) + if !ok { // returned by HandlerFunc handleError(err) os.Exit(1) } |
