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:
Ammar Bandukwala
2024-03-17 09:45:26 -05:00
committed by GitHub
parent 2a77580ba6
commit b4c0fa80d8
95 changed files with 313 additions and 311 deletions
+5 -5
View File
@@ -21,25 +21,25 @@ import (
"github.com/coder/serpent"
)
func (r *RootCmd) support() *serpent.Cmd {
supportCmd := &serpent.Cmd{
func (r *RootCmd) support() *serpent.Command {
supportCmd := &serpent.Command{
Use: "support",
Short: "Commands for troubleshooting issues with a Coder deployment.",
Handler: func(inv *serpent.Invocation) error {
return inv.Command.HelpHandler(inv)
},
Hidden: true, // TODO: un-hide once the must-haves from #12160 are completed.
Children: []*serpent.Cmd{
Children: []*serpent.Command{
r.supportBundle(),
},
}
return supportCmd
}
func (r *RootCmd) supportBundle() *serpent.Cmd {
func (r *RootCmd) supportBundle() *serpent.Command {
var outputPath string
client := new(codersdk.Client)
cmd := &serpent.Cmd{
cmd := &serpent.Command{
Use: "bundle <workspace> [<agent>]",
Short: "Generate a support bundle to troubleshoot issues connecting to a workspace.",
Long: `This command generates a file containing detailed troubleshooting information about the Coder deployment and workspace connections. You must specify a single workspace (and optionally an agent name).`,