isExtensionCommand returns true if args resolve to an extension command.
(rootCmd *cobra.Command, args []string)
| 269 | |
| 270 | // isExtensionCommand returns true if args resolve to an extension command. |
| 271 | func isExtensionCommand(rootCmd *cobra.Command, args []string) bool { |
| 272 | c, _, err := rootCmd.Find(args) |
| 273 | return err == nil && c != nil && c.GroupID == "extension" |
| 274 | } |
| 275 | |
| 276 | // printError writes err to out, followed by usage information when the error |
| 277 | // is the result of command misuse. When fullHelp is set the complete help text |