Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Evaluate ¶
Evaluate parse and apply the template to the specified data object, and returns the evaluated string.
func Execute ¶
Execute applies a parsed template to the specified data object, and writes the output to w. If an error occurs executing the template or writing its output, execution stops, but partial results may already have been written to the output writer. A template may be executed safely in parallel, although if parallel executions share a Writer the output may be interleaved.
Types ¶
type ELTemplate ¶
type ELTemplate struct {
// contains filtered or unexported fields
}
func (*ELTemplate) Evaluate ¶
func (elt *ELTemplate) Evaluate(data any, strict ...bool) (string, error)
Evaluate applies a parsed template to the specified data object, and returns the evaluated string.
func (*ELTemplate) Execute ¶
Execute applies a parsed template to the specified data object, and writes the output to w. If an error occurs executing the template or writing its output, execution stops, but partial results may already have been written to the output writer. A template may be executed safely in parallel, although if parallel executions share a Writer the output may be interleaved.
func (*ELTemplate) String ¶
func (elt *ELTemplate) String() string