Go, AppEngine: How to structure templates for application
Posted
by
laslowh
on Stack Overflow
See other posts from Stack Overflow
or by laslowh
Published on 2012-03-05T20:39:10Z
Indexed on
2012/10/27
23:01 UTC
Read the original article
Hit count: 155
google-app-engine
|go
How are people handling the use of templates in their Go-based AppEngine applications?
Specifically, I'm looking for a project structure that affords the following:
- Hierarchical (directory) structure of templates and partial templates
- Allow me to use HTML tools/editors on my templates (embedding template text in xxx.go files makes this difficult)
- Automatic reload of template text when on dev server
Potential stumbling blocks are:
- template.ParseGlob() will not traverse recursively.
- For performance reasons it has been recommended not to upload your templates as raw text files (because those text files reside on different servers than executing code).
Please note that I am not looking for a tutorial/examples of the use of the template package. This is more of an app structure question. That being said, if you have code that solves the above problems, I would love to see it. Thanks in advance.
© Stack Overflow or respective owner