MCPcopy Create free account
hub / github.com/driangle/taskmd / parseImportFilters

Function parseImportFilters

apps/cli/internal/cli/importcmd.go:437–446  ·  view source on GitHub ↗

parseImportFilters parses "key:value key2:value2" into a map.

(raw string)

Source from the content-addressed store, hash-verified

435
436// parseImportFilters parses "key:value key2:value2" into a map.
437func 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.
449type importResultData struct {

Callers 2

Calls

no outgoing calls

Tested by 1