all repos — navani @ 3d8e721aa152691f68eeeb75ae9bd23dab55b1ba

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}