Lookup returns the canonical category name for a given name or alias. Returns ("", false) if not found.
(name string)
| 62 | // Lookup returns the canonical category name for a given name or alias. |
| 63 | // Returns ("", false) if not found. |
| 64 | func (t *Taxonomy) Lookup(name string) (string, bool) { |
| 65 | canonical, ok := t.lookup[strings.ToLower(strings.TrimSpace(name))] |
| 66 | return canonical, ok |
| 67 | } |
| 68 | |
| 69 | // AllCanonicalNames returns all canonical category names. |
| 70 | func (t *Taxonomy) AllCanonicalNames() []string { |
no outgoing calls
no test coverage detected