Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTemplate ¶
LoadTemplate parses and caches an HTML template file by its path.
If the template has been parsed before, it returns the cached version. Otherwise, it loads and parses the template and stores it in memory.
func RenderTemplate ¶
RenderTemplate renders an HTML template with the given recipient's data.
It uses caching internally for performance. Recipient values can be accessed in the template via:
- {{ .Email }} for the top-level email
- {{ .Data.name }}, {{ .Data.age }}, etc. for CSV fields
func StartServer ¶
StartServer starts a local HTTP server to preview the rendered email. Returns an error if the server fails to start or serve.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.