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

Function findCommand

pkg/cmd/root/help.go:246–253  ·  view source on GitHub ↗
(cmd *cobra.Command, name string)

Source from the content-addressed store, hash-verified

244}
245
246func findCommand(cmd *cobra.Command, name string) *cobra.Command {
247 for _, c := range cmd.Commands() {
248 if c.Name() == name {
249 return c
250 }
251 }
252 return nil
253}
254
255type CommandGroup struct {
256 Title string

Callers 1

WriteHelpFunction · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected