all repos — navani @ 7251f1ba6f5f2ef42c543124d0132057f4894ee4

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}