Small changes based on review comments
This commit is contained in:
@@ -273,6 +273,8 @@ func (e *Entity) getDomainLists() {
|
||||
domains = domainsToInspect
|
||||
}
|
||||
|
||||
domains = makeDistinct(domains)
|
||||
|
||||
for _, d := range domains {
|
||||
log.Tracef("intel: loading domain list for %s", d)
|
||||
list, err := filterlists.LookupDomain(d)
|
||||
@@ -441,3 +443,12 @@ func buildLookupMap(l []string) filterlists.LookupMap {
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func makeDistinct(slice []string) []string {
|
||||
lm := buildLookupMap(slice)
|
||||
result := make([]string, 0, len(lm))
|
||||
for key := range lm {
|
||||
result = append(result, key)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user