()
| 13 | ) |
| 14 | |
| 15 | func (r *RootCmd) templatePresets() *serpent.Command { |
| 16 | cmd := &serpent.Command{ |
| 17 | Use: "presets", |
| 18 | Short: "Manage presets of the specified template", |
| 19 | Aliases: []string{"preset"}, |
| 20 | Long: FormatExamples( |
| 21 | Example{ |
| 22 | Description: "List presets for the active version of a template", |
| 23 | Command: "coder templates presets list my-template", |
| 24 | }, |
| 25 | Example{ |
| 26 | Description: "List presets for a specific version of a template", |
| 27 | Command: "coder templates presets list my-template --template-version my-template-version", |
| 28 | }, |
| 29 | ), |
| 30 | Handler: func(inv *serpent.Invocation) error { |
| 31 | return inv.Command.HelpHandler(inv) |
| 32 | }, |
| 33 | Children: []*serpent.Command{ |
| 34 | r.templatePresetsList(), |
| 35 | }, |
| 36 | } |
| 37 | |
| 38 | return cmd |
| 39 | } |
| 40 | |
| 41 | func (r *RootCmd) templatePresetsList() *serpent.Command { |
| 42 | defaultColumns := []string{ |
no test coverage detected