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

Function isExtensionCommand

internal/ghcmd/cmd.go:279–282  ·  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

277
278// isExtensionCommand returns true if args resolve to an extension command.
279func isExtensionCommand(rootCmd *cobra.Command, args []string) bool {
280 c, _, err := rootCmd.Find(args)
281 return err == nil && c != nil && c.GroupID == "extension"
282}
283
284// refreshTelemetryCommands lists the commands reported by name with token refresh attempts. They are the commands that
285// refresh a token directly rather than through the HTTP client.

Callers 1

MainFunction · 0.85

Calls 1

FindMethod · 0.65

Tested by

no test coverage detected