all repos — navani @ ea8ad151310499d429bb7aa02cdb4acdac813db0

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}