glob parse templates
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user