Documentation ¶
Index ¶
- func Evaluate(tpl string, data any) (string, error)
- func EvaluateAll(data any, templates ...string) ([]string, error)
- func EvaluateAllFiles(data any, filePaths ...string) ([]string, error)
- func EvaluateAllFilesOrFail(t test.Failer, data any, filePaths ...string) []string
- func EvaluateAllOrFail(t test.Failer, data any, templates ...string) []string
- func EvaluateFile(filePath string, data any) (string, error)
- func EvaluateFileOrFail(t test.Failer, filePath string, data any) string
- func EvaluateOrFail(t test.Failer, tpl string, data any) string
- func Execute(t *template.Template, data any) (string, error)
- func ExecuteOrFail(t test.Failer, t2 *template.Template, data any) string
- func MustEvaluate(tpl string, data any) string
- func MustEvaluateAll(data any, templates ...string) []string
- func MustEvaluateFile(filePath string, data any) string
- func MustParse(tpl string) *template.Template
- func Parse(tpl string) (*template.Template, error)
- func ParseOrFail(t test.Failer, tpl string) *template.Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvaluateAll ¶
EvaluateAll calls Evaluate the same data args against each of the given templates.
func EvaluateAllFilesOrFail ¶
func EvaluateAllOrFail ¶
EvaluateAllOrFail calls Evaluate and fails t if an error occurs.
func EvaluateOrFail ¶
EvaluateOrFail calls Evaluate and fails tests if it returns error.
func ExecuteOrFail ¶
ExecuteOrFail calls Execute and fails the test if it returns an error.
func MustEvaluate ¶
MustEvaluate calls Evaluate and panics if there is an error.
func MustEvaluateAll ¶
func MustEvaluateFile ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.