GetIPv4Mask return the net.IPv4Mask value of a flag with the given name
(name string)
| 66 | |
| 67 | // GetIPv4Mask return the net.IPv4Mask value of a flag with the given name |
| 68 | func (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. |