cmdShow dispatches `flow show task|project|playbook|owner`. Per spec §5.4.
(args []string)
| 14 | |
| 15 | // cmdShow dispatches `flow show task|project|playbook|owner`. Per spec §5.4. |
| 16 | func cmdShow(args []string) int { |
| 17 | if len(args) == 0 { |
| 18 | fmt.Fprintln(os.Stderr, "error: show requires 'task', 'project', 'playbook', or 'owner'") |
| 19 | return 2 |
| 20 | } |
| 21 | switch args[0] { |
| 22 | case "task": |
| 23 | return showTaskCmd(args[1:]) |
| 24 | case "project": |
| 25 | return showProjectCmd(args[1:]) |
| 26 | case "playbook": |
| 27 | return showPlaybookCmd(args[1:]) |
| 28 | case "owner": |
| 29 | // Verb-first alias for `flow owner show <slug>` — see cmdList's |
| 30 | // "owners" case for the rationale. |
| 31 | return ownerShow(args[1:]) |
| 32 | } |
| 33 | fmt.Fprintf(os.Stderr, "error: unknown show subcommand %q\n", args[0]) |
| 34 | return 2 |
| 35 | } |
| 36 | |
| 37 | // showTaskCmd implements `flow show task [<ref>]`. |
| 38 | func showTaskCmd(args []string) int { |