glob parse templates
This commit is contained in:
@@ -37,14 +37,7 @@ func main() {
|
||||
|
||||
pages, err := template.New("").Funcs(template.FuncMap{
|
||||
"hasPrefix": strings.HasPrefix,
|
||||
}).ParseFiles(
|
||||
"templates/home.html",
|
||||
"templates/header.html",
|
||||
"templates/upload.html",
|
||||
"templates/tos.html",
|
||||
"templates/privacy.html",
|
||||
"templates/faq.html",
|
||||
)
|
||||
}).ParseGlob("templates/*.html")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user