MCPcopy
hub / github.com/spf13/pflag / CountP

Method CountP

count.go:80–84  ·  view source on GitHub ↗

CountP is like Count only takes a shorthand for the flag name.

(name, shorthand string, usage string)

Source from the content-addressed store, hash-verified

78
79// CountP is like Count only takes a shorthand for the flag name.
80func (f *FlagSet) CountP(name, shorthand string, usage string) *int {
81 p := new(int)
82 f.CountVarP(p, name, shorthand, usage)
83 return p
84}
85
86// Count defines a count flag with specified name, default value, and usage string.
87// The return value is the address of an int variable that stores the value of the flag.

Callers 3

TestPrintDefaultsFunction · 0.95
CountFunction · 0.80
CountPFunction · 0.80

Calls 1

CountVarPMethod · 0.95

Tested by 1

TestPrintDefaultsFunction · 0.76