mirror of
https://github.com/edoardottt/cariddi.git
synced 2026-09-14 05:37:44 +02:00
15 lines
294 B
Go
15 lines
294 B
Go
package utils
|
|
|
|
//removeDuplicateValues
|
|
func removeDuplicateValues(intSlice []string) []string {
|
|
keys := make(map[string]bool)
|
|
list := []string{}
|
|
for _, entry := range intSlice {
|
|
if _, value := keys[entry]; !value {
|
|
keys[entry] = true
|
|
list = append(list, entry)
|
|
}
|
|
}
|
|
return list
|
|
}
|