MCPcopy Create free account
hub / github.com/Facets-cloud/flow / cmdRun

Function cmdRun

internal/app/run.go:16–29  ·  view source on GitHub ↗

cmdRun handles `flow run `. Currently only `run playbook ` is supported.

(args []string)

Source from the content-addressed store, hash-verified

14
15// cmdRun handles `flow run <subcommand>`. Currently only `run playbook <slug>` is supported.
16func cmdRun(args []string) int {
17 if len(args) == 0 {
18 fmt.Fprintln(os.Stderr, "error: run requires a subcommand (playbook)")
19 return 2
20 }
21 sub, rest := args[0], args[1:]
22 switch sub {
23 case "playbook":
24 return cmdRunPlaybook(rest)
25 default:
26 fmt.Fprintf(os.Stderr, "error: unknown run subcommand %q\n", sub)
27 return 2
28 }
29}
30
31func cmdRunPlaybook(args []string) int {
32 if len(args) == 0 {

Calls 1

cmdRunPlaybookFunction · 0.85