From 8299bf76ed55d386da0a9f1a7f6bcc5e318fc711 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 17 Oct 2023 15:28:38 -0700 Subject: [PATCH] model: native gotemplate adapter template --- server/images.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/images.go b/server/images.go index d6b53afa..8fa9e5af 100644 --- a/server/images.go +++ b/server/images.go @@ -955,11 +955,12 @@ TEMPLATE """{{ .Template }}""" {{- if .System }} SYSTEM """{{ .System }}""" {{- end }} + +{{- range $adapter := .AdapterPaths }} +ADAPTER {{ $adapter }} +{{- end }} {{ .Params }} ` - for _, l := range mt.Model.AdapterPaths { - modelFile += fmt.Sprintf("ADAPTER %s\n", l) - } tmpl, err := template.New("").Parse(modelFile) if err != nil {