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

Method HasPersistentFlags

command.go:1806–1808  ·  view source on GitHub ↗

HasPersistentFlags checks if the command contains persistent flags.

()

Source from the content-addressed store, hash-verified

1804
1805// HasPersistentFlags checks if the command contains persistent flags.
1806func (c *Command) HasPersistentFlags() bool {
1807 return c.PersistentFlags().HasFlags()
1808}
1809
1810// HasLocalFlags checks if the command has flags specifically declared locally.
1811func (c *Command) HasLocalFlags() bool {

Callers 2

persistentFlagMethod · 0.95
DebugFlagsMethod · 0.80

Calls 2

PersistentFlagsMethod · 0.95
HasFlagsMethod · 0.80

Tested by

no test coverage detected