(values []string)
| 633 | } |
| 634 | |
| 635 | func trimmedUniqueStrings(values []string) []string { |
| 636 | out := make([]string, 0, len(values)) |
| 637 | seen := make(map[string]struct{}, len(values)) |
| 638 | for _, value := range values { |
| 639 | trimmed := strings.TrimSpace(value) |
| 640 | if trimmed == "" { |
| 641 | continue |
| 642 | } |
| 643 | if _, exists := seen[trimmed]; exists { |
| 644 | continue |
| 645 | } |
| 646 | seen[trimmed] = struct{}{} |
| 647 | out = append(out, trimmed) |
| 648 | } |
| 649 | return out |
| 650 | } |
no test coverage detected