MCPcopy
hub / github.com/spf13/cobra / Parent

Method Parent

command.go:1892–1894  ·  view source on GitHub ↗

Parent returns a commands parent command.

()

Source from the content-addressed store, hash-verified

1890
1891// Parent returns a commands parent command.
1892func (c *Command) Parent() *Command {
1893 return c.parent
1894}
1895
1896// mergePersistentFlags merges c.PersistentFlags() to c.Flags()
1897// and adds missing persistent flags of all parents.

Callers 13

UsageFuncMethod · 0.95
HelpFuncMethod · 0.95
VisitParentsMethod · 0.95
RootMethod · 0.95
CommandPathMethod · 0.95
IsAvailableCommandMethod · 0.95
executeMethod · 0.80
TestGenManDocFunction · 0.80
genManFunction · 0.80
GenYamlCustomFunction · 0.80
GenReSTCustomFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestGenManDocFunction · 0.64