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

Method Uint16Var

uint16.go:44–46  ·  view source on GitHub ↗

Uint16Var defines a uint flag with specified name, default value, and usage string. The argument p points to a uint variable in which to store the value of the flag.

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

Source from the content-addressed store, hash-verified

42// Uint16Var defines a uint flag with specified name, default value, and usage string.
43// The argument p points to a uint variable in which to store the value of the flag.
44func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string) {
45 f.VarP(newUint16Value(value, p), name, "", usage)
46}
47
48// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash.
49func (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) {

Callers

nothing calls this directly

Calls 2

VarPMethod · 0.95
newUint16ValueFunction · 0.85

Tested by

no test coverage detected