func (rule *PrefixRule) Matches(address string) bool {
	return strings.HasPrefix(fillBothDots(strings.ToLower(address)), fillBothDots(rule.expression))
}
Matches returns if the address matches the prefix rule
package main
import (
	"github.com/major1201/goutils"
	"go.uber.org/zap"
	"regexp"
	"strings"
)
type Rule interface {
	Matches(address string) bool
	Expression() string
	SetExpression(o string)
	Upstream() Upstream
	SetUpstream(o Upstream)
	StaticResult() string
	SetStaticResult(o string)
}
type RuleImpl struct {
	expression   string
	upstream     Upstream
	staticResult string
}
func (r *RuleImpl) Expression() string {
	return r.expression
}
func (r *RuleImpl) SetExpression(o string) {
	r.expression = o
}
func (r *RuleImpl) Upstream() Upstream {
	return r.upstream
}
func (r *RuleImpl) SetUpstream(o Upstream) {
	r.upstream = o
}
func (r *RuleImpl) StaticResult() string {
	return r.staticResult
}
func (r *RuleImpl) SetStaticResult(o string) {
	r.staticResult = o
}
type FQDNRule struct {
	RuleImpl
}
type PrefixRule struct {
	RuleImpl
}
type SuffixRule struct {
	RuleImpl
}
type KeywordRule struct {
	RuleImpl
}
type WildcardRule struct {
	RuleImpl
}
type RegexRule struct {
	RuleImpl
	regex *regexp.Regexp
}
func (rule *FQDNRule) Matches(address string) bool {
	return strings.TrimSuffix(rule.expression, ".") == strings.TrimSuffix(strings.ToLower(address), ".")
}