istio: Index | Files

package tmpl

import ""


Package Files

evaluate.go execute.go parse.go

func Evaluate Uses

func Evaluate(tpl string, data interface{}) (string, error)

Evaluate parses the template and then executes it with the given parameters.

func EvaluateAll Uses

func EvaluateAll(data interface{}, templates ...string) ([]string, error)

EvaluateAll calls Evaluate the same data args against each of the given templates.

func EvaluateAllOrFail Uses

func EvaluateAllOrFail(t test.Failer, data interface{}, templates ...string) []string

EvaluateAllOrFail calls Evaluate and fails t if an error occurs.

func EvaluateOrFail Uses

func EvaluateOrFail(t test.Failer, tpl string, data interface{}) string

EvaluateOrFail calls Evaluate and fails tests if it returns error.

func Execute Uses

func Execute(t *template.Template, data interface{}) (string, error)

Execute the template with the given parameters.

func ExecuteOrFail Uses

func ExecuteOrFail(t test.Failer, t2 *template.Template, data interface{}) string

ExecuteOrFail calls Execute and fails the test if it returns an error.

func MustEvaluate Uses

func MustEvaluate(tpl string, data interface{}) string

MustEvaluate calls Evaluate and panics if there is an error.

func Parse Uses

func Parse(tpl string) (*template.Template, error)

Parse the given template content.

func ParseOrFail Uses

func ParseOrFail(t test.Failer, tpl string) *template.Template

ParseOrFail calls Parse and fails tests if it returns error.

Package tmpl imports 5 packages (graph) and is imported by 9 packages. Updated 2020-10-15. Refresh now. Tools for package owners.