MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / executeCmd

Function executeCmd

cmd/integration_test.go:36–43  ·  view source on GitHub ↗

executeCmd runs a command through the root cobra command and captures stdout.

(args ...string)

Source from the content-addressed store, hash-verified

34
35// executeCmd runs a command through the root cobra command and captures stdout.
36func executeCmd(args ...string) (string, error) {
37 RootCmd.SetArgs(args)
38 var execErr error
39 output := testutil.CaptureStdout(func() {
40 execErr = RootCmd.Execute()
41 })
42 return output, execErr
43}
44
45// --- Step 7: Table Output Tests ---
46

Calls 1

CaptureStdoutFunction · 0.92

Tested by

no test coverage detected