()
| 13 | ) |
| 14 | |
| 15 | func (r *RootCmd) templates() *serpent.Command { |
| 16 | cmd := &serpent.Command{ |
| 17 | Use: "templates", |
| 18 | Short: "Manage templates", |
| 19 | Long: "Templates are written in standard Terraform and describe the infrastructure for workspaces\n" + FormatExamples( |
| 20 | Example{ |
| 21 | Description: "Create or push an update to the template. Your developers can update their workspaces", |
| 22 | Command: "coder templates push my-template", |
| 23 | }, |
| 24 | ), |
| 25 | Aliases: []string{"template"}, |
| 26 | Handler: func(inv *serpent.Invocation) error { |
| 27 | return inv.Command.HelpHandler(inv) |
| 28 | }, |
| 29 | Children: []*serpent.Command{ |
| 30 | r.templateCreate(), |
| 31 | r.templateEdit(), |
| 32 | r.templateInit(), |
| 33 | r.templateList(), |
| 34 | r.templatePush(), |
| 35 | r.templateVersions(), |
| 36 | r.templatePresets(), |
| 37 | r.templateDelete(), |
| 38 | r.templatePull(), |
| 39 | r.archiveTemplateVersions(), |
| 40 | }, |
| 41 | } |
| 42 | |
| 43 | return cmd |
| 44 | } |
| 45 | |
| 46 | func selectTemplate(inv *serpent.Invocation, client *codersdk.Client, organization codersdk.Organization) (codersdk.Template, error) { |
| 47 | var empty codersdk.Template |
no test coverage detected