MCPcopy
hub / github.com/urfave/cli / FlagNames

Method FlagNames

command.go:547–555  ·  command.go::Command.FlagNames

FlagNames returns a slice of flag names used by the this command and all of its parent commands.

()

Source from the content-addressed store, hash-verified

545// FlagNames returns a slice of flag names used by the this command
546// and all of its parent commands.
547func (cmd *Command) FlagNames() []string {
548 names := cmd.LocalFlagNames()
549
550 if cmd.parent != nil {
551 names = append(cmd.parent.FlagNames(), names...)
552 }
553
554 return names
555}
556
557// Lineage returns *this* command and all of its ancestor commands
558// in order from child to parent

Callers 4

TestFlagsFromEnvFunction · 0.95
TestCommand_NumFlagsFunction · 0.95

Calls 1

LocalFlagNamesMethod · 0.95

Tested by 4

TestFlagsFromEnvFunction · 0.76
TestCommand_NumFlagsFunction · 0.76