From 3c182fc1dff0aea7079986a92eb47218f2da49f3 Mon Sep 17 00:00:00 2001 From: spatialfree Date: Sun, 3 Nov 2024 02:06:07 -0500 Subject: [PATCH] handle nested templates --- tem/tem.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tem/tem.go b/tem/tem.go index 8d82dd2..5deb512 100644 --- a/tem/tem.go +++ b/tem/tem.go @@ -11,7 +11,8 @@ var ( ) func Load() { - Templates = template.Must(template.ParseGlob("tem/html/*.html")) + func_map := template.FuncMap{} + Templates = template.Must(template.New("").Funcs(func_map).ParseGlob("tem/html/**/*.html")) fmt.Println("templates loaded") }