Checks if a command or one of its ancestors is in the list
(cmd *cobra.Command, cmds []string)
| 653 | |
| 654 | // Checks if a command or one of its ancestors is in the list |
| 655 | func findCommand(cmd *cobra.Command, cmds []string) bool { |
| 656 | if cmd == nil { |
| 657 | return false |
| 658 | } |
| 659 | if slices.Contains(cmds, cmd.Name()) { |
| 660 | return true |
| 661 | } |
| 662 | return findCommand(cmd.Parent(), cmds) |
| 663 | } |
| 664 | |
| 665 | func isSupported(cmd *cobra.Command, details versionDetails) error { |
| 666 | if err := areSubcommandsSupported(cmd, details); err != nil { |
no test coverage detected
searching dependent graphs…