can improve efficiency of dedupe slightly without much complication

master
Ted Unangst 5 years ago
parent 8d966a1d50
commit 9a0b9a90bf

@ -356,15 +356,13 @@ func newphone(a []string, obj map[string]interface{}) []string {
func oneofakind(a []string) []string {
var x []string
for n, s := range a {
for i := n + 1; i < len(a); i++ {
if a[i] == s {
a[i] = ""
}
}
}
for _, s := range a {
if s != "" {
x = append(x, s)
for i := n + 1; i < len(a); i++ {
if a[i] == s {
a[i] = ""
}
}
}
}
return x

Loading…
Cancel
Save