From 312753924be1109a22269ebde81fa244ef9b6379 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 23 Feb 2025 00:55:18 +0900 Subject: command: root early handler func special case This allows for early initialisation with access to flags on the root node. This can be useful for configuring global state used by subcommands. Signed-off-by: Ophestra --- command/builder_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'command/builder_test.go') diff --git a/command/builder_test.go b/command/builder_test.go index 1cd4ce38..22ce7aee 100644 --- a/command/builder_test.go +++ b/command/builder_test.go @@ -7,7 +7,7 @@ import ( ) func TestBuild(t *testing.T) { - c := command.New(nil, nil, "test") + c := command.New(nil, nil, "test", nil) stubHandler := func([]string) error { panic("unreachable") } t.Run("nil direct handler", func(t *testing.T) { -- cgit v1.3.1