工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
907 B

package servicegen
import (
"path/filepath"
"text/template"
)
var (
apiTmpl *template.Template
apiPreTmpl *template.Template
apiTaskTmpl *template.Template
apiTestTmpl *template.Template
dbModelTmpl *template.Template
optionsTmpl *template.Template
externalTmpl *template.Template
)
func init() {
apiTmpl = template.Must(template.ParseFiles(filepath.Join("servicegen/tmpl/api.tmpl")))
apiPreTmpl = template.Must(template.ParseFiles("servicegen/tmpl/api_pre.tmpl"))
apiTaskTmpl = template.Must(template.ParseFiles("servicegen/tmpl/api_task.tmpl"))
apiTestTmpl = template.Must(template.ParseFiles("servicegen/tmpl/api_test.tmpl"))
dbModelTmpl = template.Must(template.ParseFiles("servicegen/tmpl/db_model.tmpl"))
optionsTmpl = template.Must(template.ParseFiles("servicegen/tmpl/external.tmpl"))
externalTmpl = template.Must(template.ParseFiles("servicegen/tmpl/options.tmpl"))
}