feat: 重构路由渲染逻辑,添加构建渲染数据和模板渲染功能,优化代码结构

This commit is contained in:
Rogee
2025-09-11 19:14:44 +08:00
parent a23e31fea3
commit 344798163b
4 changed files with 174 additions and 104 deletions

View File

@@ -31,8 +31,9 @@ func (r *Routes) Name() string {
}
func (r *Routes) Register(router fiber.Router) {
{{- range $key, $value := .Routes }}
{{- range $key := .RouteGroups }}
// : {{$key}}
{{- $value := index $.Routes $key }}
{{- range $value }}
router.{{.Method}}("{{.Route}}", {{.Func}}(
r.{{.Controller}}.{{.Action}},