mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-11 00:40:00 +08:00
feat: goctl model Add a new method hasField (#5484)
This commit is contained in:
@@ -28,7 +28,7 @@ func genImports(table Table, withCache, timeImport bool) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
buffer, err := util.With("import").Parse(text).Execute(map[string]any{
|
||||
buffer, err := util.With("import").Parse(text).AddFunc("hasField", hasField(table)).Execute(map[string]any{
|
||||
"time": timeImport,
|
||||
"containsPQ": table.ContainsPQ,
|
||||
"data": table,
|
||||
|
||||
Reference in New Issue
Block a user