Documentation ¶
Overview ¶
Package tplz provides various utilities for working with the Go templating engine.
Index ¶
- func ExecuteGo(template *ttpl.Template, data any) ([]byte, error)
- func ExecuteHTML(template *htpl.Template, data any) ([]byte, error)
- func ExecuteJSON(template *ttpl.Template, prefix, indent string, data any) ([]byte, error)
- func ExecuteText(template *ttpl.Template, data any) ([]byte, error)
- func MustExecuteGo(template *ttpl.Template, data any) []byte
- func MustExecuteHTML(template *htpl.Template, data any) []byte
- func MustExecuteJSON(template *ttpl.Template, prefix, indent string, data any) []byte
- func MustExecuteText(template *ttpl.Template, data any) []byte
- func MustParseAndExecuteGo(template string, data any) []byte
- func MustParseAndExecuteHTML(template string, data any) []byte
- func MustParseAndExecuteJSON(template, prefix, indent string, data any) []byte
- func MustParseAndExecuteText(template string, data any) []byte
- func ParseAndExecuteGo(template string, data any) ([]byte, error)
- func ParseAndExecuteHTML(template string, data any) ([]byte, error)
- func ParseAndExecuteJSON(template, prefix, indent string, data any) ([]byte, error)
- func ParseAndExecuteText(template string, data any) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteHTML ¶
ExecuteHTML executes a HTML template.
func ExecuteJSON ¶
ExecuteJSON executes a text template, formatting the result as JSON code.
func ExecuteText ¶
ExecuteText executes a text template.
func MustExecuteGo ¶
MustExecuteGo is like ExecuteGo but panics on error.
func MustExecuteHTML ¶
MustExecuteHTML is like ExecuteHTML but panics on error.
func MustExecuteJSON ¶
MustExecuteJSON is like ExecuteJSON but panics on error.
func MustExecuteText ¶
MustExecuteText is like ExecuteText but panics on error.
func MustParseAndExecuteGo ¶
MustParseAndExecuteGo is like ParseAndExecuteGo but panics on error.
func MustParseAndExecuteHTML ¶
MustParseAndExecuteHTML is like ParseAndExecuteHTML but panics on error.
func MustParseAndExecuteJSON ¶
MustParseAndExecuteJSON is like ParseAndExecuteJSON but panics on error.
func MustParseAndExecuteText ¶
MustParseAndExecuteText is like ParseAndExecuteText but panics on error.
func ParseAndExecuteGo ¶
ParseAndExecuteGo parses and executes a text template, formatting the result as Go code.
func ParseAndExecuteHTML ¶
ParseAndExecuteHTML parses and executes a HTML template.
func ParseAndExecuteJSON ¶
ParseAndExecuteJSON parses and executes a text template, formatting the result as JSON code.
Types ¶
This section is empty.