Documentation
¶
Index ¶
- func AddTemplateFunc(tmplStr string, funcName string) (string, error)
- func CreateTemplateWithFunc(name string, funcMap template.FuncMap) *template.Template
- func ParseTemplate(templt *template.Template, tmplStr string, variables any) (string, error)
- func RenderJSON(data map[string]any, variables map[string]any) (map[string]any, error)
- func RenderNormalizedTemplate(name string, tmplStr string, variables any) (string, error)
- func RenderTemplate(name string, tmplStr string, variables any) (string, error)
- func TransformTemplateKeys(tmplStr string, prefix string, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTemplateFunc ¶
Add template func to each variable
func CreateTemplateWithFunc ¶
Create new template with funcMap
func ParseTemplate ¶
Parse template
func RenderJSON ¶
Render json template
func RenderNormalizedTemplate ¶
Create template with funcMap and apply func to all variables
func RenderTemplate ¶
Create new template and parse it
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.