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

Method HasAvailableInheritedFlags

command.go:1839–1841  ·  view source on GitHub ↗

HasAvailableInheritedFlags checks if the command has flags inherited from its parent command which are not hidden or deprecated.

()

Source from the content-addressed store, hash-verified

1837// HasAvailableInheritedFlags checks if the command has flags inherited from its parent command which are
1838// not hidden or deprecated.
1839func (c *Command) HasAvailableInheritedFlags() bool {
1840 return c.InheritedFlags().HasAvailableFlags()
1841}
1842
1843// Flag climbs up the command tree looking for matching flag.
1844func (c *Command) Flag(name string) (flag *flag.Flag) {

Callers 1

defaultUsageFuncFunction · 0.80

Calls 2

InheritedFlagsMethod · 0.95
HasAvailableFlagsMethod · 0.80

Tested by

no test coverage detected