istio: istio.io/istio/pkg/test/util/tmpl Index | Files

package tmpl

import "istio.io/istio/pkg/test/util/tmpl"

Index

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 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 3 packages (graph) and is imported by 6 packages. Updated 2019-06-12. Refresh now. Tools for package owners.