Files
mps/middleware.go
telanflow 1b6a370f99 init
2020-08-09 02:38:46 +08:00

14 lines
323 B
Go

package mps
import "net/http"
type Middleware interface {
Handle(req *http.Request, ctx *Context) (*http.Response, error)
}
type MiddlewareFunc func(req *http.Request, ctx *Context) (*http.Response, error)
func (f MiddlewareFunc) Handle(req *http.Request, ctx *Context) (*http.Response, error) {
return f(req, ctx)
}