func (f *Filter) Init() {
	compiled, failed := compileRegexp(f.whitelist)
	f.whiteRegexp = compiled
	f.failedWhiteRegexp = failed
	compiled, failed = compileRegexp(f.blacklist)
	f.blackRegexp = compiled
	f.failedBlackRegexp = failed
}
Init - Initializes Filter, precompiling regex
package registries
import (
	"regexp"
	"sync"
	log "github.com/sirupsen/logrus"
)
type filterMode uint8
const (
	filterModeBoth filterMode = iota
	filterModeWhite
	filterModeBlack
	filterModeNone
)
type failedRegexp struct {
	regex string
	err   error
}
type Filter struct {
	whitelist         []string
	blacklist         []string
	whiteRegexp       []*regexp.Regexp
	blackRegexp       []*regexp.Regexp
	failedWhiteRegexp []failedRegexp
	failedBlackRegexp []failedRegexp
}