From f869ff95a12756de97827b4afd93763f9661f144 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 8 Jun 2026 14:19:11 +0900 Subject: all: apply modernisers Signed-off-by: Ophestra --- command/parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'command') 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) } -- cgit v1.3.1