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

Method Count

command.go:603–608  ·  view source on GitHub ↗

Count returns the num of occurrences of this flag

(name string)

Source from the content-addressed store, hash-verified

601
602// Count returns the num of occurrences of this flag
603func (cmd *Command) Count(name string) int {
604 if cf, ok := cmd.lookupFlag(name).(Countable); ok {
605 return cf.Count()
606 }
607 return 0
608}
609
610// Value returns the value of the flag corresponding to `name`
611func (cmd *Command) Value(name string) any {

Callers 1

Calls 2

lookupFlagMethod · 0.95
CountMethod · 0.65

Tested by 1