mirror of
https://github.com/paralus/paralus.git
synced 2026-05-19 06:46:41 +00:00
14 lines
251 B
Go
14 lines
251 B
Go
package service
|
|
|
|
func unique(items []string) []string {
|
|
keys := make(map[string]bool)
|
|
list := []string{}
|
|
for _, entry := range items {
|
|
if _, value := keys[entry]; !value {
|
|
keys[entry] = true
|
|
list = append(list, entry)
|
|
}
|
|
}
|
|
return list
|
|
}
|