(value string, parameter parser.Parameter)
| 229 | } |
| 230 | |
| 231 | func (c typeConverter) convertValueToBooleanArray(value string, parameter parser.Parameter) ([]bool, error) { |
| 232 | splitted := c.splitEscaped(value, ',') |
| 233 | |
| 234 | result := []bool{} |
| 235 | for _, itemStr := range splitted { |
| 236 | item, err := c.convertToBoolean(itemStr, parameter) |
| 237 | if err != nil { |
| 238 | return nil, fmt.Errorf("Cannot convert '%s' values '%s' to boolean array", parameter.Name, value) |
| 239 | } |
| 240 | result = append(result, item) |
| 241 | } |
| 242 | return result, nil |
| 243 | } |
| 244 | |
| 245 | func (c typeConverter) splitEscaped(str string, separator byte) []string { |
| 246 | return c.splitEscapedMaxCount(str, separator, -1) |
no test coverage detected