can improve efficiency of dedupe slightly without much complication
This commit is contained in:
parent
8d966a1d50
commit
9a0b9a90bf
|
@ -356,16 +356,14 @@ func newphone(a []string, obj map[string]interface{}) []string {
|
|||
func oneofakind(a []string) []string {
|
||||
var x []string
|
||||
for n, s := range a {
|
||||
if s != "" {
|
||||
x = append(x, s)
|
||||
for i := n + 1; i < len(a); i++ {
|
||||
if a[i] == s {
|
||||
a[i] = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, s := range a {
|
||||
if s != "" {
|
||||
x = append(x, s)
|
||||
}
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue