(ctx context.Context, root *Command, args ...string)
| 35 | } |
| 36 | |
| 37 | func executeCommandWithContext(ctx context.Context, root *Command, args ...string) (output string, err error) { |
| 38 | buf := new(bytes.Buffer) |
| 39 | root.SetOut(buf) |
| 40 | root.SetErr(buf) |
| 41 | root.SetArgs(args) |
| 42 | |
| 43 | err = root.ExecuteContext(ctx) |
| 44 | |
| 45 | return buf.String(), err |
| 46 | } |
| 47 | |
| 48 | func executeCommandC(root *Command, args ...string) (c *Command, output string, err error) { |
| 49 | buf := new(bytes.Buffer) |
no test coverage detected