Files
isp-gate-service/approve/matcher/runtime_matcher.go
T
2019-11-06 16:38:50 +03:00

18 lines
318 B
Go

package matcher
import "path"
type runtimeMatcher struct {
patterns []string
}
func (mm runtimeMatcher) Match(method string) []string {
resp := make([]string, 0)
for _, pattern := range mm.patterns {
if matched, _ := path.Match(pattern, method); matched {
resp = append(resp, pattern)
}
}
return resp
}