@@ -41,7 +41,7 @@ func newAlphaCommand() *cobra.Command {
4141}
4242
4343func (c * CLI ) newAlphaCmd () * cobra.Command {
44- alpha := & cobra.Command {
44+ cmd := & cobra.Command {
4545 Use : alphaCommand ,
4646 SuggestFor : []string {"experimental" },
4747 Short : "Alpha-stage subcommands" ,
@@ -54,9 +54,9 @@ Alpha subcommands are for unstable features.
5454 }
5555 // TODO: Add alpha commands here if we need to have them
5656 for i := range alphaCommands {
57- alpha .AddCommand (alphaCommands [i ])
57+ cmd .AddCommand (alphaCommands [i ])
5858 }
59- return alpha
59+ return cmd
6060}
6161
6262func (c * CLI ) addAlphaCmd () {
@@ -67,24 +67,24 @@ func (c *CLI) addAlphaCmd() {
6767
6868func (c * CLI ) addExtraAlphaCommands () error {
6969 // Search for the alpha subcommand
70- var alpha * cobra.Command
70+ var cmds * cobra.Command
7171 for _ , subCmd := range c .cmd .Commands () {
7272 if subCmd .Name () == alphaCommand {
73- alpha = subCmd
73+ cmds = subCmd
7474 break
7575 }
7676 }
77- if alpha == nil {
77+ if cmds == nil {
7878 return fmt .Errorf ("no %q command found" , alphaCommand )
7979 }
8080
8181 for _ , cmd := range c .extraAlphaCommands {
82- for _ , subCmd := range alpha .Commands () {
82+ for _ , subCmd := range cmds .Commands () {
8383 if cmd .Name () == subCmd .Name () {
8484 return fmt .Errorf ("command %q already exists" , fmt .Sprintf ("%s %s" , alphaCommand , cmd .Name ()))
8585 }
8686 }
87- alpha .AddCommand (cmd )
87+ cmds .AddCommand (cmd )
8888 }
8989 return nil
9090}
0 commit comments