summaryrefslogtreecommitdiff
path: root/templates.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-09-16 21:16:13 -0600
committertjpcc <tjp@ctrl-c.club>2023-09-16 21:16:13 -0600
commitf05cd393b1f70c2844e78ae8d803c80f9553da05 (patch)
tree26c2797b10e74edb5a878e8ffa63a9d4a533628f /templates.go
parentf2b044364129ee9e4f66348e747bd53b4d7e55ac (diff)
clean up a bit of template logic
Diffstat (limited to 'templates.go')
-rw-r--r--templates.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/templates.go b/templates.go
index e31f06f..3f8cf42 100644
--- a/templates.go
+++ b/templates.go
@@ -5,9 +5,11 @@ import (
"text/template"
)
-//go:embed templates/*.gmi
-var geminiTemplateFS embed.FS
-var geminiTemplate = template.Must(template.ParseFS(geminiTemplateFS, "templates/*.gmi"))
+var (
+ //go:embed templates/*.gmi
+ geminiTemplateFS embed.FS
+ geminiTemplate = template.Must(template.ParseFS(geminiTemplateFS, "templates/*.gmi"))
+)
func addTemplates(base *template.Template, additions *template.Template) (*template.Template, error) {
base, err := base.Clone()