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

Method IPMask

ipmask.go:100–104  ·  view source on GitHub ↗

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

(name string, value net.IPMask, usage string)

Source from the content-addressed store, hash-verified

98// IPMask defines an net.IPMask flag with specified name, default value, and usage string.
99// The return value is the address of an net.IPMask variable that stores the value of the flag.
100func (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask {
101 p := new(net.IPMask)
102 f.IPMaskVarP(p, name, "", value, usage)
103 return p
104}
105
106// IPMaskP is like IPMask, but accepts a shorthand letter that can be used after a single dash.
107func (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask {

Callers 3

TestPrintDefaultsFunction · 0.95
StringMethod · 0.80
testParseFunction · 0.80

Calls 1

IPMaskVarPMethod · 0.95

Tested by 2

TestPrintDefaultsFunction · 0.76
testParseFunction · 0.64