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

Function Int

int.go:77–79  ·  view source on GitHub ↗

Int defines an int flag with specified name, default value, and usage string. The return value is the address of an int variable that stores the value of the flag.

(name string, value int, usage string)

Source from the content-addressed store, hash-verified

75// Int defines an int flag with specified name, default value, and usage string.
76// The return value is the address of an int variable that stores the value of the flag.
77func Int(name string, value int, usage string) *int {
78 return CommandLine.IntP(name, "", value, usage)
79}
80
81// IntP is like Int, but accepts a shorthand letter that can be used after a single dash.
82func IntP(name, shorthand string, value int, usage string) *int {

Callers 1

flag_test.goFile · 0.85

Calls 1

IntPMethod · 0.80

Tested by

no test coverage detected