소스 검색

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

불러오는 중...
취소
저장