Documentation
¶
Overview ¶
Package template provides pipeline template rendering engine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct{}
Engine renders Go text/template strings with helper functions and caching. Each RenderString call captures its own data via closures so concurrent invocations are safe without locking.
func (*Engine) Render ¶
Render traverses a map of parameters and renders any template strings found within using the given TemplateData.
func (*Engine) RenderString ¶
func (*Engine) RenderString(tmpl string, data *TemplateData) (string, error)
RenderString renders a template string with the given TemplateData. Templates are cached by their preprocessed string; on cache hit the cached parse tree is cloned and fresh data-dependent functions (event, input, step) are attached via closures for the current call.