Fixes #1248
This commit is contained in:
Frank Denis 2020-03-25 09:11:10 +01:00
parent c39d66661b
commit 4fe5929720
4 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ type PatternMatcher struct {
indirectVals map[string]interface{}
}
func NewPatternPatcher() *PatternMatcher {
func NewPatternMatcher() *PatternMatcher {
patternMatcher := PatternMatcher{
blockedPrefixes: critbitgo.NewTrie(),
blockedSuffixes: critbitgo.NewTrie(),

View File

@ -91,7 +91,7 @@ func (plugin *PluginBlockName) Init(proxy *Proxy) error {
}
xBlockedNames := BlockedNames{
allWeeklyRanges: proxy.allWeeklyRanges,
patternMatcher: NewPatternPatcher(),
patternMatcher: NewPatternMatcher(),
}
for lineNo, line := range strings.Split(string(bin), "\n") {
line = TrimAndStripInlineComments(line)

View File

@ -42,7 +42,7 @@ func (plugin *PluginCloak) Init(proxy *Proxy) error {
return err
}
plugin.ttl = proxy.cloakTTL
plugin.patternMatcher = NewPatternPatcher()
plugin.patternMatcher = NewPatternMatcher()
cloakedNames := make(map[string]*CloakedName)
for lineNo, line := range strings.Split(string(bin), "\n") {
line = TrimAndStripInlineComments(line)

View File

@ -35,7 +35,7 @@ func (plugin *PluginWhitelistName) Init(proxy *Proxy) error {
return err
}
plugin.allWeeklyRanges = proxy.allWeeklyRanges
plugin.patternMatcher = NewPatternPatcher()
plugin.patternMatcher = NewPatternMatcher()
for lineNo, line := range strings.Split(string(bin), "\n") {
line = TrimAndStripInlineComments(line)
if len(line) == 0 {