Refine router config parse

This commit is contained in:
秋のかえで 2021-04-08 13:19:25 +08:00
parent 68201a8898
commit 44317bd657
No known key found for this signature in database
GPG key ID: C687746B27587C0D
3 changed files with 26 additions and 8 deletions

View file

@ -1,5 +1,7 @@
package geosite
import "strings"
type AttributeList struct {
matcher []AttributeMatcher
}
@ -25,7 +27,7 @@ type BooleanMatcher string
func (m BooleanMatcher) Match(domain *Domain) bool {
for _, attr := range domain.Attribute {
if attr.Key == string(m) {
if strings.EqualFold(attr.GetKey(), string(m)) {
return true
}
}