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

Method IntVar

int.go:40–42  ·  view source on GitHub ↗

IntVar defines an int flag with specified name, default value, and usage string. The argument p points to an int variable in which to store the value of the flag.

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

Source from the content-addressed store, hash-verified

38// IntVar defines an int flag with specified name, default value, and usage string.
39// The argument p points to an int variable in which to store the value of the flag.
40func (f *FlagSet) IntVar(p *int, name string, value int, usage string) {
41 f.VarP(newIntValue(value, p), name, "", usage)
42}
43
44// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash.
45func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) {

Callers 1

CopyToGoFlagSetMethod · 0.80

Calls 2

VarPMethod · 0.95
newIntValueFunction · 0.85

Tested by

no test coverage detected