Documentation
¶
Overview ¶
Package engine provides template rendering functionality and interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
Render(template string, context map[string]interface{}) (string, error)
RenderFile(filepath string, context map[string]interface{}) (string, error)
}
Engine defines the interface for template engines
type Pongo2Engine ¶
type Pongo2Engine struct{}
Pongo2Engine implements Engine using Pongo2
func NewPongo2Engine ¶
func NewPongo2Engine() *Pongo2Engine
NewPongo2Engine creates a new Pongo2 templating engine
func (*Pongo2Engine) Render ¶
func (e *Pongo2Engine) Render(template string, context map[string]interface{}) (string, error)
Render renders a template string with the given context
func (*Pongo2Engine) RenderFile ¶
func (e *Pongo2Engine) RenderFile(filepath string, context map[string]interface{}) (string, error)
RenderFile renders a template file with the given context
Click to show internal directories.
Click to hide internal directories.