cache only embedded templates
This commit is contained in:
parent
caabd069d6
commit
7b558c529b
1 changed files with 3 additions and 1 deletions
|
|
@ -35,7 +35,9 @@ func Render(path string, writer io.Writer, data interface{}) {
|
||||||
return template.HTML(content)
|
return template.HTML(content)
|
||||||
},
|
},
|
||||||
}).ParseFS(FS, path))
|
}).ParseFS(FS, path))
|
||||||
FS.templates[path] = tmpl
|
if FS.embedded != nil {
|
||||||
|
FS.templates[path] = tmpl
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tmpl.Execute(writer, data)
|
tmpl.Execute(writer, data)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue