mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore(cli): rename Cmd to Command (#12616)
I think Command is cleaner and my original decision to use "Cmd" a mistake. Plus this creates better parity with cobra.
This commit is contained in:
@ -107,7 +107,7 @@ var usageTemplate = func() *template.Template {
|
||||
}
|
||||
return sb.String()
|
||||
},
|
||||
"formatSubcommand": func(cmd *serpent.Cmd) string {
|
||||
"formatSubcommand": func(cmd *serpent.Command) string {
|
||||
// Minimize padding by finding the longest neighboring name.
|
||||
maxNameLength := len(cmd.Name())
|
||||
if parent := cmd.Parent; parent != nil {
|
||||
@ -189,12 +189,12 @@ var usageTemplate = func() *template.Template {
|
||||
s = wrapTTY(s)
|
||||
return s
|
||||
},
|
||||
"visibleChildren": func(cmd *serpent.Cmd) []*serpent.Cmd {
|
||||
return filterSlice(cmd.Children, func(c *serpent.Cmd) bool {
|
||||
"visibleChildren": func(cmd *serpent.Command) []*serpent.Command {
|
||||
return filterSlice(cmd.Children, func(c *serpent.Command) bool {
|
||||
return !c.Hidden
|
||||
})
|
||||
},
|
||||
"optionGroups": func(cmd *serpent.Cmd) []optionGroup {
|
||||
"optionGroups": func(cmd *serpent.Command) []optionGroup {
|
||||
groups := []optionGroup{{
|
||||
// Default group.
|
||||
Name: "",
|
||||
|
Reference in New Issue
Block a user