(cmd *cobra.Command)
| 349 | } |
| 350 | |
| 351 | func allManagementSubCommands(cmd *cobra.Command) []*cobra.Command { |
| 352 | cmds := []*cobra.Command{} |
| 353 | for _, sub := range cmd.Commands() { |
| 354 | if invalidPluginReason(sub) != "" { |
| 355 | continue |
| 356 | } |
| 357 | if sub.IsAvailableCommand() && (isPlugin(sub) || sub.HasSubCommands()) { |
| 358 | cmds = append(cmds, sub) |
| 359 | } |
| 360 | } |
| 361 | return cmds |
| 362 | } |
| 363 | |
| 364 | func invalidPlugins(cmd *cobra.Command) []*cobra.Command { |
| 365 | cmds := []*cobra.Command{} |
searching dependent graphs…