String defines a "native" format for this net.IPNet slice flag value.
()
| 61 | |
| 62 | // String defines a "native" format for this net.IPNet slice flag value. |
| 63 | func (s *ipNetSliceValue) String() string { |
| 64 | |
| 65 | ipNetStrSlice := make([]string, len(*s.value)) |
| 66 | for i, n := range *s.value { |
| 67 | ipNetStrSlice[i] = n.String() |
| 68 | } |
| 69 | |
| 70 | out, _ := writeAsCSV(ipNetStrSlice) |
| 71 | return "[" + out + "]" |
| 72 | } |
| 73 | |
| 74 | func ipNetSliceConv(val string) (interface{}, error) { |
| 75 | val = strings.Trim(val, "[]") |
nothing calls this directly
no test coverage detected