refactor logging and filters

This commit is contained in:
Aleksandr Trushkin
2024-02-19 18:11:59 +03:00
parent 149cde5b22
commit fd9e5ade18
14 changed files with 409 additions and 92 deletions

View File

@ -71,7 +71,7 @@ func (r *radixMatcher) MatchByPattern(value string) (pattern string) {
}
if !node.exact {
return r.findByRegexp(value)
return r.findByRegexp(originValue)
}
return sb.String()

View File

@ -11,6 +11,7 @@ func TestRadixMatcherWithPattern(t *testing.T) {
m.Register("aloha")
m.Register("hawaii")
m.Register("te*")
m.Register("Ширина")
var tt = []struct {
name string
@ -37,6 +38,9 @@ func TestRadixMatcherWithPattern(t *testing.T) {
}, {
name: "should not match 3",
in: "alohaya",
}, {
name: "should match exact 3",
in: "Ширина",
}}
for _, tc := range tt {