Comments (1)
你是对的,这里是个 Bug,缺少了单元测试。v1.6.1 已修正,感谢:
go get github.com/clevergo/[email protected]
router.Use(
middleware("全局中间件1"),
middleware("全局中间件2"),
)
test := router.Group("/test", clevergo.RouteGroupMiddleware(
middleware("路由组中间件1"),
middleware("路由组中间件2"),
))
test.Get("/abc", myHandle, clevergo.RouteMiddleware(
middleware("路由中间件1"),
middleware("路由中间件2"),
))
开始: 全局中间件1
开始: 全局中间件2
开始: 路由组中间件1
开始: 路由组中间件2
开始: 路由中间件1
开始: 路由中间件2
执行: handle
结束: 路由中间件2
结束: 路由中间件1
结束: 路由组中间件2
结束: 路由组中间件1
结束: 全局中间件2
结束: 全局中间件1
from clevergo.
Related Issues (9)
- Use global middleware HOT 1
- 建议添加一些常用的快捷输出方法. HOT 1
- 如何在中间件中获取ctx.Response响应状态? HOT 2
- 路由功能加强 HOT 4
- https://clevergo.tech/ 证书过期 HOT 2
- Render 覆盖已设置 Content-Type Header HOT 5
- session doc from https://clevergo.tech/zh/basics/session/ is empty HOT 1
- /hello/xxx/ match route app.Get("/hello/:name" should be 404 not 301 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clevergo.