cmdRun handles `flow run `. Currently only `run playbook ` is supported.
(args []string)
| 14 | |
| 15 | // cmdRun handles `flow run <subcommand>`. Currently only `run playbook <slug>` is supported. |
| 16 | func 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 | |
| 31 | func cmdRunPlaybook(args []string) int { |
| 32 | if len(args) == 0 { |