Bug fixes for custom filter list
This commit is contained in:
@@ -23,6 +23,12 @@ var (
|
||||
const numberOfZeroIPsUntilWarning = 100
|
||||
|
||||
func parseFile(filePath string) error {
|
||||
// reset all maps, previous (if any) settings will be lost
|
||||
countryCodesFilterList = make(map[string]struct{})
|
||||
ipAddressesFilterList = make(map[string]struct{})
|
||||
autonomousSystemsFilterList = make(map[uint]struct{})
|
||||
domainsFilterList = make(map[string]struct{})
|
||||
|
||||
// ignore empty file path
|
||||
if filePath == "" {
|
||||
return nil
|
||||
@@ -36,12 +42,6 @@ func parseFile(filePath string) error {
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
// initialize maps to hold data from the file
|
||||
countryCodesFilterList = make(map[string]struct{})
|
||||
ipAddressesFilterList = make(map[string]struct{})
|
||||
autonomousSystemsFilterList = make(map[uint]struct{})
|
||||
domainsFilterList = make(map[string]struct{})
|
||||
|
||||
var numberOfZeroIPs uint64
|
||||
|
||||
// read filter file line by line
|
||||
|
||||
Reference in New Issue
Block a user