try to abstract matcher
This commit is contained in:
13
internal/matcher/matcher.go
Normal file
13
internal/matcher/matcher.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user