command: filter parse errors
All checks were successful
Test / Create distribution (push) Successful in 25s
Test / Run NixOS test (push) Successful in 3m29s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-02-23 12:55:10 +09:00
parent eda4d612c2
commit ba1498cd18
2 changed files with 30 additions and 0 deletions

View File

@@ -29,6 +29,11 @@ type (
Command interface {
Parse(arguments []string) error
// MustParse determines exit outcomes for Parse errors
// and calls handleError if [HandlerFunc] returns a non-nil error.
MustParse(arguments []string, handleError func(error))
baseNode[Command]
}
Node baseNode[Node]