glob parse templates

This commit is contained in:
2026-11-18 16:51:47 -05:00
parent 89e9de8a37
commit a58d9af781
+1 -8
View File
@@ -37,14 +37,7 @@ func main() {
pages, err := template.New("").Funcs(template.FuncMap{ pages, err := template.New("").Funcs(template.FuncMap{
"hasPrefix": strings.HasPrefix, "hasPrefix": strings.HasPrefix,
}).ParseFiles( }).ParseGlob("templates/*.html")
"templates/home.html",
"templates/header.html",
"templates/upload.html",
"templates/tos.html",
"templates/privacy.html",
"templates/faq.html",
)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }