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

Method HasFlags

command.go:1801–1803  ·  view source on GitHub ↗

HasFlags checks if the command contains any flags (local plus persistent from the entire structure).

()

Source from the content-addressed store, hash-verified

1799
1800// HasFlags checks if the command contains any flags (local plus persistent from the entire structure).
1801func (c *Command) HasFlags() bool {
1802 return c.Flags().HasFlags()
1803}
1804
1805// HasPersistentFlags checks if the command contains persistent flags.
1806func (c *Command) HasPersistentFlags() bool {

Callers 5

DebugFlagsMethod · 0.80
HasPersistentFlagsMethod · 0.80
HasLocalFlagsMethod · 0.80
HasInheritedFlagsMethod · 0.80
GenYamlCustomFunction · 0.80

Calls 1

FlagsMethod · 0.95

Tested by

no test coverage detected