refactor templateFiles
This commit is contained in:
parent
e699eec6e0
commit
69e6374a75
@ -17,14 +17,14 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Define the common layout templates filenames
|
// Define the common layout templates filenames
|
||||||
var layoutFiles = []string{
|
var templateFiles = []string{
|
||||||
"#layout.html",
|
"#layout.html",
|
||||||
"header.html",
|
"header.html",
|
||||||
"footer.html",
|
"footer.html",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the common templates with full paths
|
// Initialize the common templates with full paths
|
||||||
var layout = utils.PrependDir(templatesDir, layoutFiles)
|
var layout = utils.PrependDir(templatesDir, templateFiles)
|
||||||
|
|
||||||
func renderTemplate(w http.ResponseWriter, data PageData, view string) {
|
func renderTemplate(w http.ResponseWriter, data PageData, view string) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user