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

Method Int16

int16.go:66–70  ·  view source on GitHub ↗

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

(name string, value int16, usage string)

Source from the content-addressed store, hash-verified

64// Int16 defines an int16 flag with specified name, default value, and usage string.
65// The return value is the address of an int16 variable that stores the value of the flag.
66func (f *FlagSet) Int16(name string, value int16, usage string) *int16 {
67 p := new(int16)
68 f.Int16VarP(p, name, "", value, usage)
69 return p
70}
71
72// Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash.
73func (f *FlagSet) Int16P(name, shorthand string, value int16, usage string) *int16 {

Callers 1

testParseFunction · 0.80

Calls 1

Int16VarPMethod · 0.95

Tested by 1

testParseFunction · 0.64