MCPcopy
hub / github.com/spf13/cobra / executeCommandC

Function executeCommandC

command_test.go:48–57  ·  view source on GitHub ↗
(root *Command, args ...string)

Source from the content-addressed store, hash-verified

46}
47
48func 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
59func executeCommandWithContextC(ctx context.Context, root *Command, args ...string) (c *Command, output string, err error) {
60 buf := new(bytes.Buffer)

Callers 2

executeCommandFunction · 0.85
TestSubcommandExecuteCFunction · 0.85

Calls 5

SetOutMethod · 0.80
SetErrMethod · 0.80
SetArgsMethod · 0.80
ExecuteCMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected