Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFuncMap ¶
GetFuncMap returns the list of functions provided by sprig. It changes the function "fail" to set the given string, this way we can report template errors directly to the template without having the wrapper that text/template adds.
sprig "env" and "expandenv" functions are removed to avoid the leak of information.
func ValidateTemplate ¶
ValidateTemplate validates a text template results in valid JSON when it's executed with empty template data. If template execution results in invalid JSON, the template is invalid. When the template is valid, it can be used safely. A valid template can still result in invalid JSON when non-empty template data is provided.
func ValidateTemplateData ¶
ValidateTemplateData validates that template data is valid JSON.
Types ¶
This section is empty.