mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-11 00:40:00 +08:00
Add goctl version to code header (#4293)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl {{.version}}
|
||||
|
||||
{{.componentTypes}}
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/zeromicro/go-zero/tools/goctl/api/spec"
|
||||
apiutil "github.com/zeromicro/go-zero/tools/goctl/api/util"
|
||||
"github.com/zeromicro/go-zero/tools/goctl/internal/version"
|
||||
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
|
||||
)
|
||||
|
||||
@@ -61,5 +62,6 @@ func genComponents(dir string, api *spec.ApiSpec) error {
|
||||
t := template.Must(template.New("componentsTemplate").Parse(componentsTemplate))
|
||||
return t.Execute(fp, map[string]string{
|
||||
"componentTypes": val,
|
||||
"version": version.BuildVersion,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user