aboutsummaryrefslogtreecommitdiffhomepage
path: root/command/builder.go
diff options
context:
space:
mode:
Diffstat (limited to 'command/builder.go')
-rw-r--r--command/builder.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/command/builder.go b/command/builder.go
index 5c9b4de9..c0782c66 100644
--- a/command/builder.go
+++ b/command/builder.go
@@ -7,8 +7,10 @@ import (
)
// New initialises a root Node.
-func New(output io.Writer, logf LogFunc, name string) Command {
- return rootNode{newNode(output, logf, name, "")}
+func New(output io.Writer, logf LogFunc, name string, early HandlerFunc) Command {
+ c := rootNode{newNode(output, logf, name, "")}
+ c.f = early
+ return c
}
func newNode(output io.Writer, logf LogFunc, name, usage string) *node {