Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
Context alias pongo2.Context. Context provides constants, variables, instances or functions to a template. see https://godoc.org/github.com/flosch/pongo2#Context
type FileTemplate ¶
type FileTemplate struct {
// contains filtered or unexported fields
}
FileTemplate ...
func (*FileTemplate) Execute ¶
func (t *FileTemplate) Execute(context Context) (string, error)
Execute the template and returns the rendered template as a string.
func (*FileTemplate) ExecuteBytes ¶
func (t *FileTemplate) ExecuteBytes(context Context) ([]byte, error)
ExecuteBytes the template and returns the rendered template as a []byte.
func (*FileTemplate) ExecuteWriter ¶
func (t *FileTemplate) ExecuteWriter(context Context, w io.Writer) error
ExecuteWriter writes result that the template with the given context to writer.
type Template ¶
type Template interface { Execute(context Context) (string, error) ExecuteBytes(context Context) ([]byte, error) ExecuteWriter(context Context, w io.Writer) error }
Template ...
type TemplateSet ¶
type TemplateSet struct {
// contains filtered or unexported fields
}
TemplateSet is group of template.
Click to show internal directories.
Click to hide internal directories.