aboutsummaryrefslogtreecommitdiffhomepage
path: root/command/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'command/command.go')
-rw-r--r--command/command.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/command/command.go b/command/command.go
index eeec135d..5533c4ef 100644
--- a/command/command.go
+++ b/command/command.go
@@ -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]