1
0
Fork 0
mirror of https://github.com/spf13/cobra synced 2025-04-23 07:07:18 +00:00
This commit is contained in:
Fraser Waters 2025-02-21 12:11:47 +00:00
parent 47f12e63de
commit 3473156b22

View file

@ -2926,8 +2926,7 @@ func TestHelpFuncExecuted(t *testing.T) {
helpText := "Long description"
// Create a context that will be unique, not just the background context
executionCtx, cancel := context.WithCancel(context.Background())
defer cancel()
executionCtx := context.WithValue(context.Background(), "testKey", "123")
child := &Command{Use: "child", Run: emptyRun}
child.SetHelpFunc(func(cmd *Command, args []string) {