Helper function to find a subcommand by name
(cmd *cobra.Command, name string)
| 145 | |
| 146 | // Helper function to find a subcommand by name |
| 147 | func findSubcommand(cmd *cobra.Command, name string) *cobra.Command { |
| 148 | for _, subCmd := range cmd.Commands() { |
| 149 | if subCmd.Name() == name { |
| 150 | return subCmd |
| 151 | } |
| 152 | } |
| 153 | return nil |
| 154 | } |
| 155 | |
| 156 | // TestCompletionCommand_BashScriptFormat verifies bash completion can be generated |
| 157 | func TestCompletionCommand_BashScriptFormat(t *testing.T) { |
no outgoing calls
no test coverage detected