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

Method CountVarP

count.go:55–58  ·  view source on GitHub ↗

CountVarP is like CountVar only take a shorthand for the flag name.

(p *int, name, shorthand string, usage string)

Source from the content-addressed store, hash-verified

53
54// CountVarP is like CountVar only take a shorthand for the flag name.
55func (f *FlagSet) CountVarP(p *int, name, shorthand string, usage string) {
56 flag := f.VarPF(newCountValue(0, p), name, shorthand, usage)
57 flag.NoOptDefVal = "+1"
58}
59
60// CountVar like CountVar only the flag is placed on the CommandLine instead of a given flag set
61func CountVar(p *int, name string, usage string) {

Callers 5

CountVarMethod · 0.95
CountMethod · 0.95
CountPMethod · 0.95
setUpCountFunction · 0.95
CountVarPFunction · 0.80

Calls 2

VarPFMethod · 0.95
newCountValueFunction · 0.85

Tested by 1

setUpCountFunction · 0.76