GetIPSlice returns the []net.IP value of a flag with the given name
(name string)
| 130 | |
| 131 | // GetIPSlice returns the []net.IP value of a flag with the given name |
| 132 | func (f *FlagSet) GetIPSlice(name string) ([]net.IP, error) { |
| 133 | val, err := f.getFlagType(name, "ipSlice", ipSliceConv) |
| 134 | if err != nil { |
| 135 | return []net.IP{}, err |
| 136 | } |
| 137 | return val.([]net.IP), nil |
| 138 | } |
| 139 | |
| 140 | // IPSliceVar defines a ipSlice flag with specified name, default value, and usage string. |
| 141 | // The argument p points to a []net.IP variable in which to store the value of the flag. |