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

Method GetIPv4Mask

ipmask.go:68–74  ·  view source on GitHub ↗

GetIPv4Mask return the net.IPv4Mask value of a flag with the given name

(name string)

Source from the content-addressed store, hash-verified

66
67// GetIPv4Mask return the net.IPv4Mask value of a flag with the given name
68func (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error) {
69 val, err := f.getFlagType(name, "ipMask", parseIPv4Mask)
70 if err != nil {
71 return nil, err
72 }
73 return val.(net.IPMask), nil
74}
75
76// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string.
77// The argument p points to an net.IPMask variable in which to store the value of the flag.

Callers 1

testParseFunction · 0.80

Calls 1

getFlagTypeMethod · 0.95

Tested by 1

testParseFunction · 0.64