Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileMap ¶
type FileMap struct { PackageTemplate map[string]string ModelTemplate map[string]string QueryTemplate map[string]string OtherTemplate map[string]string NormalFile map[string]string }
package.tmpl model.tmpl query.tmpl
other.tmpl
t.txt go.mod
文件中带有
@model.go.tmpl @model_logic.go.tmpl @model_handler.go.tmpl
扫描文件 所有package.tmpl文件,用全局数据过一遍 所有model.tmpl文件,用model数组过一遍 所有query.tmpl文件,用query数组过一遍
所有普通tmpl文件,用全局数据过一遍 非模板文件,直接拷贝过去
用模板生成的文件保持模板文件的目录结构不变,且都去掉.tmpl
func NewFileMap ¶
func NewFileMap() *FileMap
Click to show internal directories.
Click to hide internal directories.