Added removing whitelisted words to removing safewords
Again this is to assist with splitting the removing duplicates into multiple go routinestesting
parent
8bb577ee5c
commit
16e28ee13a
|
|
@ -257,9 +257,12 @@ func removeduplicates(siteBuff *[]siteList, whitelist *[]string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removing safewords
|
// Removing safewords and whitelisted words
|
||||||
log.Print("Checking for safewords")
|
log.Print("Checking for safewords and whitelisted words")
|
||||||
for i,e := range entry {
|
for i,e := range entry {
|
||||||
|
if (*e.r == true) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
for _,w := range(safewords) {
|
for _,w := range(safewords) {
|
||||||
if *e.s == w {
|
if *e.s == w {
|
||||||
*(entry[i].r) = true
|
*(entry[i].r) = true
|
||||||
|
|
@ -267,6 +270,13 @@ func removeduplicates(siteBuff *[]siteList, whitelist *[]string) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for _, w := range *whitelist {
|
||||||
|
if *e.s == w {
|
||||||
|
*(entry[i].r) = true
|
||||||
|
c.w++
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removing duplicates
|
// Removing duplicates
|
||||||
|
|
@ -276,13 +286,6 @@ func removeduplicates(siteBuff *[]siteList, whitelist *[]string) {
|
||||||
if *(entry[i].r) == true {
|
if *(entry[i].r) == true {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for _, w := range *whitelist {
|
|
||||||
if *e.s == w {
|
|
||||||
*(entry[i].r) = true
|
|
||||||
c.w++
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if *(entry[i].r) == true {
|
if *(entry[i].r) == true {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue