I have a set of templates as files, like base.html
, login.html
, profile.html
, header.html
and so on. They are structured in folders.
It's fine to have them as separate files during development but when I deploy the app, I'd like to have them all embedded as strings or parsed and compiled templates ready to use from the code as usual.
How should I better make these templates as Go code? So that I don't have to have a templates
folder in production, but everything in the single executable file?