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

Function parseIPv4Mask

ipmask.go:59–65  ·  view source on GitHub ↗
(sval string)

Source from the content-addressed store, hash-verified

57}
58
59func parseIPv4Mask(sval string) (interface{}, error) {
60 mask := ParseIPv4Mask(sval)
61 if mask == nil {
62 return nil, fmt.Errorf("unable to parse %s as net.IPMask", sval)
63 }
64 return mask, nil
65}
66
67// GetIPv4Mask return the net.IPv4Mask value of a flag with the given name
68func (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error) {

Callers

nothing calls this directly

Calls 1

ParseIPv4MaskFunction · 0.85

Tested by

no test coverage detected