Refactor: A faster DomainMatcher implementation (#348)

Co-authored-by: DarthVader <61409963+darsvador@users.noreply.github.com>
This commit is contained in:
秋のかえで 2021-04-18 13:21:17 +08:00 committed by GitHub
parent bf94fb53ca
commit 7b7084f825
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 912 additions and 52 deletions

View file

@ -27,6 +27,7 @@ const (
// New creates a new Matcher based on the given pattern.
func (t Type) New(pattern string) (Matcher, error) {
// 1. regex matching is case-sensitive
switch t {
case Full:
return fullMatcher(pattern), nil