(root *Command, args ...string)
| 46 | } |
| 47 | |
| 48 | func executeCommandC(root *Command, args ...string) (c *Command, output string, err error) { |
| 49 | buf := new(bytes.Buffer) |
| 50 | root.SetOut(buf) |
| 51 | root.SetErr(buf) |
| 52 | root.SetArgs(args) |
| 53 | |
| 54 | c, err = root.ExecuteC() |
| 55 | |
| 56 | return c, buf.String(), err |
| 57 | } |
| 58 | |
| 59 | func executeCommandWithContextC(ctx context.Context, root *Command, args ...string) (c *Command, output string, err error) { |
| 60 | buf := new(bytes.Buffer) |