Documentation ¶
Overview ¶
Package templates contains all logic related to template rendering.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TemplateRenderer ¶
type TemplateRenderer struct { TextFiles map[string]string TemplateLeftDelim string TemplateRightDelim string TempDir string }
TemplateRenderer replaces creates files and replaces placeholders for files in text.
func (*TemplateRenderer) RenderFiles ¶
func (tr *TemplateRenderer) RenderFiles(templateParams map[string]interface{}) (map[string]interface{}, error)
RenderFiles creates temporary files and returns paths to created files.
func (*TemplateRenderer) RenderTemplate ¶
func (tr *TemplateRenderer) RenderTemplate(name, text string, templateParams map[string]interface{}) ([]byte, error)
RenderTemplate replaces placeholders with real values in text.
Click to show internal directories.
Click to hide internal directories.