Add goctl version to code header (#4293)

This commit is contained in:
kesonan
2024-08-03 22:22:51 +08:00
committed by GitHub
parent dedba17219
commit 64e3aeda55
11 changed files with 28 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import (
"path/filepath"
"github.com/zeromicro/go-zero/tools/goctl/config"
"github.com/zeromicro/go-zero/tools/goctl/internal/version"
"github.com/zeromicro/go-zero/tools/goctl/model/mongo/template"
"github.com/zeromicro/go-zero/tools/goctl/util"
"github.com/zeromicro/go-zero/tools/goctl/util/format"
@@ -59,6 +60,7 @@ func generateModel(ctx *Context) error {
"Type": stringx.From(t).Title(),
"lowerType": stringx.From(t).Untitle(),
"Cache": ctx.Cache,
"version": version.BuildVersion,
}, output, true); err != nil {
return err
}

View File

@@ -1,4 +1,6 @@
// Code generated by goctl. DO NOT EDIT.
// goctl {{.version}}
package model
import (