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

Function cmdShow

internal/app/show.go:16–35  ·  view source on GitHub ↗

cmdShow dispatches `flow show task|project|playbook|owner`. Per spec §5.4.

(args []string)

Source from the content-addressed store, hash-verified

14
15// cmdShow dispatches `flow show task|project|playbook|owner`. Per spec §5.4.
16func 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>]`.
38func showTaskCmd(args []string) int {

Calls 4

showTaskCmdFunction · 0.85
showProjectCmdFunction · 0.85
showPlaybookCmdFunction · 0.85
ownerShowFunction · 0.85