Files
apinto/router-k/match.go
黄孟柱 a10d4b53a0 init
2021-07-20 11:11:39 +08:00

21 lines
306 B
Go

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
}
}