try to abstract matcher

This commit is contained in:
Aleksandr Trushkin
2024-02-10 20:21:55 +03:00
parent 504e5fce29
commit 969ef726eb
2 changed files with 53 additions and 23 deletions

View File

@ -0,0 +1,13 @@
package matcher
type Unit interface {
MatchByPattern(value string) (pattern string)
Match(value string) bool
// Move this to init stage because some of matchers
// might not be applicable to it
RegisterRegexp(regexpPattern string)
Register(pattern string)
Patterns() []string
}