fix panic for nil pointer

This commit is contained in:
ginuerzh
2025-08-13 21:24:05 +08:00
parent 0e5c285eb7
commit d0ff5358df
4 changed files with 24 additions and 6 deletions
+11
View File
@@ -259,3 +259,14 @@ func (m *ipRangeMatcher) Match(addr string) bool {
}
return false
}
type nopMatcher struct {
}
func NopMatcher() Matcher {
return &nopMatcher{}
}
func (m *nopMatcher) Match(addr string) bool {
return false
}