MCPcopy Create free account
hub / github.com/driangle/taskmd / outputTemplatesTable

Function outputTemplatesTable

apps/cli/internal/cli/templates_cmd.go:79–92  ·  view source on GitHub ↗
(items []templateListItem)

Source from the content-addressed store, hash-verified

77}
78
79func outputTemplatesTable(items []templateListItem) error {
80 if len(items) == 0 {
81 fmt.Println("No templates found")
82 return nil
83 }
84
85 w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
86 fmt.Fprintln(w, "NAME\tDESCRIPTION\tSOURCE")
87 fmt.Fprintln(w, "----\t-----------\t------")
88 for _, item := range items {
89 fmt.Fprintf(w, "%s\t%s\t%s\n", item.Name, item.Description, item.Source)
90 }
91 return w.Flush()
92}

Callers 1

runTemplatesListFunction · 0.85

Calls 1

FlushMethod · 0.80

Tested by

no test coverage detected