all: apply modernisers

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-06-08 14:19:11 +09:00
parent 725f2e0ef3
commit f869ff95a1
35 changed files with 146 additions and 141 deletions
+2 -2
View File
@@ -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)
}