Skip to content

Commit

Permalink
update the format for displaying a list of templates
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed Apr 29, 2024
1 parent d7d289c commit ec529fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/commands/waypoint/templates/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,11 @@ func listTemplates(opts *TemplateOpts) error {
templates = append(templates, resp.GetPayload().ApplicationTemplates...)
}

return opts.Output.Show(templates, format.Pretty)
templateFields := []format.Field{
format.NewField("Name", "{{ .Name }}"),
format.NewField("ID", "{{ .ID }}"),
format.NewField("Summary", "{{ .Summary }}"),
}

return opts.Output.Display(format.NewDisplayer(templates, format.Table, templateFields))
}

0 comments on commit ec529fb

Please sign in to comment.