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

Method NonInheritedFlags

command.go:1770–1772  ·  view source on GitHub ↗

NonInheritedFlags returns all flags which were not inherited from parent commands. This function does not modify the flags of the current command, it's purpose is to return the current state.

()

Source from the content-addressed store, hash-verified

1768// NonInheritedFlags returns all flags which were not inherited from parent commands.
1769// This function does not modify the flags of the current command, it's purpose is to return the current state.
1770func (c *Command) NonInheritedFlags() *flag.FlagSet {
1771 return c.LocalFlags()
1772}
1773
1774// PersistentFlags returns the persistent FlagSet specifically set in the current command.
1775func (c *Command) PersistentFlags() *flag.FlagSet {

Callers 8

getCompletionsMethod · 0.95
completeRequireFlagsFunction · 0.80
writeFlagsFunction · 0.80
writeRequiredFlagFunction · 0.80
manPrintOptionsFunction · 0.80
GenYamlCustomFunction · 0.80
printOptionsReSTFunction · 0.80
printOptionsFunction · 0.80

Calls 1

LocalFlagsMethod · 0.95

Tested by

no test coverage detected