We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What needs to be changed? Describe the update that is required. 文档中middleware.go默认模版和源代码不一致
What is the name + path of the page that needs changed? The relative path and page title where you found a problem. 这是cloudwego中middleware.go的模版:
{{define "M"}} func {{.MiddleWare}}Mw() []app.HandlerFunc { // your code... return nil } {{range $_, $router := $.Children}}{{template "M" $router}}{{end}} {{- end}} {{template "M" .Router}}
这是Hertz源码中的默认模版:
{{define "M"}} {{- if ne .Children.Len 0}} func {{.GroupMiddleware}}Mw() []app.HandlerFunc { // your code... return nil } {{end}} {{- if ne .Handler ""}} func {{.HandlerMiddleware}}Mw() []app.HandlerFunc { // your code... return nil } {{end}} {{range $_, $router := $.Children}}{{template "M" $router}}{{end}} {{- end}} {{template "M" .Router}}
router.go的模版也有类似的问题
The text was updated successfully, but these errors were encountered:
@tqqq 模板后面路由都有一些更新,文档中没有及时更新,你可以提个 pr 帮忙改下吗
Sorry, something went wrong.
No branches or pull requests
What needs to be changed? Describe the update that is required.
文档中middleware.go默认模版和源代码不一致
What is the name + path of the page that needs changed? The relative path
and page title where you found a problem.
这是cloudwego中middleware.go的模版:
这是Hertz源码中的默认模版:
router.go的模版也有类似的问题
The text was updated successfully, but these errors were encountered: