@@ -41,7 +41,7 @@ func newAlphaCommand() *cobra.Command {
41
41
}
42
42
43
43
func (c * CLI ) newAlphaCmd () * cobra.Command {
44
- alpha := & cobra.Command {
44
+ cmd := & cobra.Command {
45
45
Use : alphaCommand ,
46
46
SuggestFor : []string {"experimental" },
47
47
Short : "Alpha-stage subcommands" ,
@@ -54,9 +54,9 @@ Alpha subcommands are for unstable features.
54
54
}
55
55
// TODO: Add alpha commands here if we need to have them
56
56
for i := range alphaCommands {
57
- alpha .AddCommand (alphaCommands [i ])
57
+ cmd .AddCommand (alphaCommands [i ])
58
58
}
59
- return alpha
59
+ return cmd
60
60
}
61
61
62
62
func (c * CLI ) addAlphaCmd () {
@@ -67,24 +67,24 @@ func (c *CLI) addAlphaCmd() {
67
67
68
68
func (c * CLI ) addExtraAlphaCommands () error {
69
69
// Search for the alpha subcommand
70
- var alpha * cobra.Command
70
+ var cmds * cobra.Command
71
71
for _ , subCmd := range c .cmd .Commands () {
72
72
if subCmd .Name () == alphaCommand {
73
- alpha = subCmd
73
+ cmds = subCmd
74
74
break
75
75
}
76
76
}
77
- if alpha == nil {
77
+ if cmds == nil {
78
78
return fmt .Errorf ("no %q command found" , alphaCommand )
79
79
}
80
80
81
81
for _ , cmd := range c .extraAlphaCommands {
82
- for _ , subCmd := range alpha .Commands () {
82
+ for _ , subCmd := range cmds .Commands () {
83
83
if cmd .Name () == subCmd .Name () {
84
84
return fmt .Errorf ("command %q already exists" , fmt .Sprintf ("%s %s" , alphaCommand , cmd .Name ()))
85
85
}
86
86
}
87
- alpha .AddCommand (cmd )
87
+ cmds .AddCommand (cmd )
88
88
}
89
89
return nil
90
90
}
0 commit comments