1 Star 0 Fork 0

kade / mcube

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
middleware.go 509 Bytes
一键复制 编辑 原始数据 按行查看 历史
kadegolang 提交于 2023-12-13 17:31 . copy
package router
import (
"net/http"
)
// Middleware 中间件的函数签名
type Middleware interface {
Handler(http.Handler) http.Handler
}
// MiddlewareFunc is an adapter to allow the use of ordinary functions as Negroni handlers.
// If f is a function with the appropriate signature, HandlerFunc(f) is a Handler object that calls f.
type MiddlewareFunc func(http.Handler) http.Handler
// Handler wrappe for function
func (h MiddlewareFunc) Handler(next http.Handler) http.Handler {
return h(next)
}
1
https://gitee.com/go-kade/mcube.git
git@gitee.com:go-kade/mcube.git
go-kade
mcube
mcube
1225d9a674f1

搜索帮助

53164aa7 5694891 3bd8fe86 5694891