▹ Example
Engine parses template source into renderable text.
type Engine interface { RegisterFilter(name string, fn interface{}) RegisterTag(string, func(form string) (func(io.Writer, chunks.Context) error, error)) ParseTemplate(text []byte) (Template, error) ParseAndRender(text []byte, bindings map[string]interface{}) ([]byte, error) ParseAndRenderString(text string, bindings map[string]interface{}) (string, error) }
func NewEngine() Engine
NewEngine returns a new engine.
type TagDefinition func(expr string) (func(io.Writer, chunks.Context) error, error)
Template renders a template according to scope.
Bindings is a map of liquid variable names to objects.
type Template interface { // Render executes the template with the specified bindings. Render(bindings map[string]interface{}) ([]byte, error) // RenderString is a convenience wrapper for Render, that has string input and output. RenderString(bindings map[string]interface{}) (string, error) }