parseImportFilters parses "key:value key2:value2" into a map.
(raw string)
| 435 | |
| 436 | // parseImportFilters parses "key:value key2:value2" into a map. |
| 437 | func parseImportFilters(raw string) map[string]any { |
| 438 | filters := make(map[string]any) |
| 439 | for _, pair := range strings.Fields(raw) { |
| 440 | key, value, ok := strings.Cut(pair, ":") |
| 441 | if ok && key != "" { |
| 442 | filters[key] = value |
| 443 | } |
| 444 | } |
| 445 | return filters |
| 446 | } |
| 447 | |
| 448 | // importResultData is the structured representation for JSON/YAML output. |
| 449 | type importResultData struct { |
no outgoing calls