Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Render ¶
func Render(templateStr string, data TemplateData) (string, error)
Render parses and executes a template string using custom delimiters {[ and ]}, sprig template functions, and the provided data. It returns the rendered string.
func RenderFromEnv ¶
RenderFromEnv parses and executes a template string using the current environment variables as template data.
Types ¶
type TemplateData ¶
type TemplateData map[string]template.ExtendedString
TemplateData is the data that will be passed to the template evaluator.
func EnvMap ¶
func EnvMap() TemplateData
EnvMap returns the current environment variables as a TemplateData map. Windows-style variable references (%VAR%) are expanded to their Unix equivalents.
func (TemplateData) Filter ¶
func (t TemplateData) Filter(pattern string) TemplateData
Filter returns a subset of T where the keys match the passed pattern. It will return an empty map and log an error if the pattern is not a valid one
Click to show internal directories.
Click to hide internal directories.