Using HTML Templates from a Folder (Complied)
·
152 words
·
1 minute read
This will take all your templates (found within the templates folder) and add them to your executable application at compile time - so it’s fast as it doesn’t have to read from file. You can call these templates with ExecuteTemplate and passing the file name as the second parameter.
If you’re using this with a web server, you can replace the os.Stdout with the net/http writer.
|
|
|
|