MCPcopy Create free account
hub / github.com/cli/cli / isExtensionCommand

Function isExtensionCommand

internal/ghcmd/cmd.go:271–274  ·  view source on GitHub ↗

isExtensionCommand returns true if args resolve to an extension command.

(rootCmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

269
270// isExtensionCommand returns true if args resolve to an extension command.
271func 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

Callers 1

MainFunction · 0.85

Calls 1

FindMethod · 0.65

Tested by

no test coverage detected