package cli import ( "fmt" "strings" "time" "github.com/google/uuid" "golang.org/x/xerrors" "github.com/coder/coder/cli/clibase" "github.com/coder/coder/cli/cliui" "github.com/coder/coder/codersdk" ) func (r *RootCmd) templateVersions() *clibase.Cmd { cmd := &clibase.Cmd{ Use: "versions", Short: "Manage different versions of the specified template", Aliases: []string{"version"}, Long: formatExamples( example{ Description: "List versions of a specific template", Command: "coder templates versions list my-template", }, ), Handler: func(inv *clibase.Invocation) error { return inv.Command.HelpHandler(inv) }, Children: []*clibase.Cmd{ r.templateVersionsList(), }, } return cmd } func (r *RootCmd) templateVersionsList() *clibase.Cmd { formatter := cliui.NewOutputFormatter( cliui.TableFormat([]templateVersionRow{}, nil), cliui.JSONFormat(), ) client := new(codersdk.Client) cmd := &clibase.Cmd{ Use: "list