浏览代码

update

master
dengbiao 4 个月前
父节点
当前提交
d5b8fa9969
共有 1 个文件被更改,包括 14 次插入6 次删除
  1. +14
    -6
      etc/db_tpl/struct.go.tpl

+ 14
- 6
etc/db_tpl/struct.go.tpl 查看文件

@@ -1,9 +1,17 @@
@echo off
setlocal
package {{.Models}}

set "inputString=hello_world"
for /f "delims=" %%i in ('powershell -File "ConvertToUpperCase.ps1" -inputString "%inputString%"') do set "outputVar=%%i"
{{$ilen := len .Imports}}
{{if gt $ilen 0}}
import (
{{range .Imports}}"{{.}}"{{end}}
)
{{end}}

echo %outputVar%
{{range .Tables}}
type {{Mapper .Name}} struct {
{{$table := .}}
{{range .ColumnsSeq}}{{$col := $table.GetColumn .}} {{Mapper $col.Name}} {{Type $col}} {{Tag $table $col}}
{{end}}
}
{{end}}

endlocal

正在加载...
取消
保存