String defines a "native" format for this boolean slice flag value.
()
| 60 | |
| 61 | // String defines a "native" format for this boolean slice flag value. |
| 62 | func (s *boolSliceValue) String() string { |
| 63 | |
| 64 | boolStrSlice := make([]string, len(*s.value)) |
| 65 | for i, b := range *s.value { |
| 66 | boolStrSlice[i] = strconv.FormatBool(b) |
| 67 | } |
| 68 | |
| 69 | out, _ := writeAsCSV(boolStrSlice) |
| 70 | |
| 71 | return "[" + out + "]" |
| 72 | } |
| 73 | |
| 74 | func (s *boolSliceValue) fromString(val string) (bool, error) { |
| 75 | return strconv.ParseBool(val) |
nothing calls this directly
no test coverage detected