Ai
1 Star 0 Fork 0

非一般/framework-iris

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
template_controller.tpl 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
非一般 提交于 2024-08-21 15:01 +08:00 . new version
// Do not edit this file.
// It's generated by console command at {{.Datetime}}. You can
// enter follow script on terminal like follow:
//
// cd /data/sketch
// go run main.go {{.Script}}
package {{.Package}}
{{- if gt (len .PackageList) 0}}
import (
{{- range .PackageList}}
{{- if .Alias}}
{{.Alias}} "{{.Pkg}}"
{{- else}}
"{{.Pkg}}"
{{- end}}
{{- end}}
)
{{- end}}
// AnnotationControllers
// is a controller list, You can load it in your main() like follow code.
//
// func main(){
// ...
//
// component := framework.New()
// component.Application.AddAnnotationControllers(annotations.AnnotationControllers...)
//
// ...
// }
var AnnotationControllers = []*framework.ControllerEntry{
{{- range .Controllers}}
// File: {{.File}}.
// Line: {{.Line}}.
{
Controller: &{{.Pkg}}.{{.Struct}}{}, Prefix: "{{.Prefix}}",
{{- if gt (len .Middlewares) 0}}
Middlewares: []string{
{{- range .Middlewares}}
"{{.}}",
{{- end}}
},
{{- end}}
},
{{- end}}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/go-wares/framework-iris.git
git@gitee.com:go-wares/framework-iris.git
go-wares
framework-iris
framework-iris
v1.1.8

搜索帮助