📌  相关文章
📜  自定义 echo golang 中间件 - Go 编程语言 - Go 编程语言代码示例

📅  最后修改于: 2022-03-11 14:44:59.132000             🧑  作者: Mango

代码示例1
e.Use(CustomeMiddleware)

// CustomeMiddleware has the access of request object
// and we can decide if we want to go ahead with the req
func CustomeMiddleware() echo.MiddlewareFunc {
    return func(next echo.HandlerFunc) echo.HandlerFunc {
        return func(c echo.Context) error {
            //do the things
        }

        return next(c)
    }
}