model: native gotemplate adapter template

This commit is contained in:
Michael Yang 2023-10-17 15:28:38 -07:00
parent ee4979e510
commit 8299bf76ed

View file

@ -955,11 +955,12 @@ TEMPLATE """{{ .Template }}"""
{{- if .System }} {{- if .System }}
SYSTEM """{{ .System }}""" SYSTEM """{{ .System }}"""
{{- end }} {{- end }}
{{- range $adapter := .AdapterPaths }}
ADAPTER {{ $adapter }}
{{- end }}
{{ .Params }} {{ .Params }}
` `
for _, l := range mt.Model.AdapterPaths {
modelFile += fmt.Sprintf("ADAPTER %s\n", l)
}
tmpl, err := template.New("").Parse(modelFile) tmpl, err := template.New("").Parse(modelFile)
if err != nil { if err != nil {