func trimDuplicates()

in src/statequery/assignments.go [175:188]


func trimDuplicates(s []string) []string {
	occurrenceMap := make(map[string]bool, len(s))
	var uniqueItems []string

	for _, item := range s {
		if item != "" {
			if !occurrenceMap[item] {
				occurrenceMap[item] = true
				uniqueItems = append(uniqueItems, item)
			}
		}
	}
	return uniqueItems
}