Files
apinto/router-k/match.go

21 lines
306 B
Go
Raw Normal View History

2021-07-20 10:46:32 +08:00
package router
import "net/http"
type IMatcher interface {
Match(req *http.Request) (http.Handler, bool)
}
type Matcher struct {
reader IReader
checker IChecker
}
func (m *Matcher) Match(req *http.Request) (http.Handler, bool) {
v, has := m.reader.Reader(req)
if !has {
return nil, false
}
}