diff --git a/pkg/kubectl/cmd/templates/command_groups.go b/pkg/kubectl/cmd/templates/command_groups.go index 42baa85a607..447a39621f7 100644 --- a/pkg/kubectl/cmd/templates/command_groups.go +++ b/pkg/kubectl/cmd/templates/command_groups.go @@ -29,9 +29,7 @@ type CommandGroups []CommandGroup func (g CommandGroups) Add(c *cobra.Command) { for _, group := range g { - for _, command := range group.Commands { - c.AddCommand(command) - } + c.AddCommand(group.Commands...) } }