all repos — navani @ 4c31ab587f36ba632ad0a08393ecd92227d19e0e

forlater's primary mail processing service

util.go (view raw)

 1package main
 2
 3func distinct(duplicates []string) []string {
 4	keys := make(map[string]bool)
 5	list := []string{}
 6	for _, item := range duplicates {
 7		if _, value := keys[item]; !value {
 8			keys[item] = true
 9			list = append(list, item)
10		}
11	}
12	return list
13}