refactor logging and filters
This commit is contained in:
@ -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()
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user