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

Function parseCommaSeparatedIDs

apps/cli/internal/cli/set.go:439–452  ·  view source on GitHub ↗

parseCommaSeparatedIDs splits a comma-separated string into a slice of trimmed IDs. An empty string returns an empty slice (used to clear the field).

(raw string)

Source from the content-addressed store, hash-verified

437// parseCommaSeparatedIDs splits a comma-separated string into a slice of trimmed IDs.
438// An empty string returns an empty slice (used to clear the field).
439func parseCommaSeparatedIDs(raw string) []string {
440 if raw == "" {
441 return []string{}
442 }
443 parts := strings.Split(raw, ",")
444 var ids []string
445 for _, p := range parts {
446 p = strings.TrimSpace(p)
447 if p != "" {
448 ids = append(ids, p)
449 }
450 }
451 return ids
452}
453
454// validateDependencies checks that all dependency IDs exist and that
455// setting them would not create a circular dependency.

Callers 1

buildSetRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected