MCPcopy Create free account
hub / github.com/Facets-cloud/flow / NormalizeTag

Function NormalizeTag

internal/flowdb/db.go:958–960  ·  view source on GitHub ↗

---------- task tag queries ---------- NormalizeTag canonicalizes a tag for storage and comparison: trim whitespace, lowercase. Returns "" for input that contains nothing after trimming — callers should treat "" as invalid.

(s string)

Source from the content-addressed store, hash-verified

956// whitespace, lowercase. Returns "" for input that contains nothing
957// after trimming — callers should treat "" as invalid.
958func NormalizeTag(s string) string {
959 return strings.ToLower(strings.TrimSpace(s))
960}
961
962// AddTaskTag attaches a tag to a task. Idempotent: re-adding an existing
963// (task_slug, tag) pair is a no-op via INSERT OR IGNORE.

Callers 5

ownerShowFunction · 0.92
cmdUpdateTaskFunction · 0.92
normalizeTagsFunction · 0.92
AddTaskTagFunction · 0.85
RemoveTaskTagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected