(value interface{})
| 1476 | } |
| 1477 | |
| 1478 | func extractStringList(value interface{}) []string { |
| 1479 | switch values := value.(type) { |
| 1480 | case []interface{}: |
| 1481 | result := make([]string, 0, len(values)) |
| 1482 | for _, value := range values { |
| 1483 | text := strings.TrimSpace(fmt.Sprintf("%v", value)) |
| 1484 | if text == "" { |
| 1485 | continue |
| 1486 | } |
| 1487 | result = append(result, text) |
| 1488 | } |
| 1489 | return result |
| 1490 | default: |
| 1491 | return []string{} |
| 1492 | } |
| 1493 | } |
| 1494 | |
| 1495 | func ensureChildMap(parent map[string]interface{}, key string) map[string]interface{} { |
| 1496 | if child, ok := parent[key].(map[string]interface{}); ok { |
no outgoing calls
no test coverage detected