MCPcopy
hub / github.com/cli/cli / findCommand

Function findCommand

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

Source from the content-addressed store, hash-verified

229}
230
231func findCommand(cmd *cobra.Command, name string) *cobra.Command {
232 for _, c := range cmd.Commands() {
233 if c.Name() == name {
234 return c
235 }
236 }
237 return nil
238}
239
240type CommandGroup struct {
241 Title string

Callers 1

rootHelpFuncFunction · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected