fix: Filters from list and regex both match (#2)

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2023-01-20 11:17:44 +01:00
commit 9cff851021
No known key found for this signature in database
GPG key ID: A2EB1F2CA8E3F677
6 changed files with 254 additions and 41 deletions

View file

@ -141,6 +141,18 @@ func (c *Config) CompileRegexes() (err error) {
return err
}
}
if c.IncludeDatabasesRegex != "" {
c.IncludeDatabasesRegexCompiled, err = regexp.Compile(c.IncludeDatabasesRegex)
if err != nil {
return err
}
}
if c.ExcludeDatabasesRegex != "" {
c.ExcludeDatabasesRegexCompiled, err = regexp.Compile(c.ExcludeDatabasesRegex)
if err != nil {
return err
}
}
return nil
}