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

Method HasParent

command.go:1677–1679  ·  view source on GitHub ↗

HasParent determines if the command is a child command.

()

Source from the content-addressed store, hash-verified

1675
1676// HasParent determines if the command is a child command.
1677func (c *Command) HasParent() bool {
1678 return c.parent != nil
1679}
1680
1681// GlobalNormalizationFunc returns the global normalization function or nil if it doesn't exist.
1682func (c *Command) GlobalNormalizationFunc() func(f *flag.FlagSet, name string) flag.NormalizedName {

Callers 15

getOutMethod · 0.95
getErrMethod · 0.95
getInMethod · 0.95
UsageFuncMethod · 0.95
getUsageTemplateFuncMethod · 0.95
HelpFuncMethod · 0.95
getHelpTemplateFuncMethod · 0.95
FlagErrorFuncMethod · 0.95
UsageTemplateMethod · 0.95
HelpTemplateMethod · 0.95
VersionTemplateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected