Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TemplateRenderingError ¶
type TemplateRenderingError struct { TemplateName string // contains filtered or unexported fields }
func (TemplateRenderingError) Error ¶
func (e TemplateRenderingError) Error() string
func (TemplateRenderingError) Unwrap ¶
func (e TemplateRenderingError) Unwrap() error
type Templates ¶
type Templates struct {
// contains filtered or unexported fields
}
func NewTemplates ¶
func (*Templates) BuildCache ¶
func (*Templates) RenderPage ¶
RenderPage renders a page by the name. If the internal cache is built, e.g. during startup, it's used. Otherwise, templates are rendered with the given data on demand. Any errors are wrapped inside a TemplateRenderingError for further analysis.
func (*Templates) RenderTemplate ¶
RenderTemplate is used for rendering specific templates on a given page. If the internal cache is built, e.g. during startup, it's used. Otherwise, templates are rendered with the given data on demand. Any errors are wrapped inside a TemplateRenderingError for further analysis.
Click to show internal directories.
Click to hide internal directories.