all repos — navani @ cb68ef039193a74e8c300c33a3f9a19e9f9ef309

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}