func runtv(tpl, expect string, vars interface{}) error {
	fmap := GenericFuncMap()
	t := template.Must(template.New("test").Funcs(fmap).Parse(tpl))
	var b bytes.Buffer
	err := t.Execute(&b, vars)
	if err != nil {
		return err
	}
	if expect != b.String() {
		return fmt.Errorf("Expected '%s', got '%s'", expect, b.String())
	}
	return nil
}
// runtv takes a template, and expected return, and values for substitution.
//
// It runs the template and verifies that the output is an exact match.
runtv takes a template, and expected return, and values for substitution.

It runs the template and verifies that the output is an exact match.
// runtv takes a template and expected return and values for substitution . // // It runs the template and verifies that the output is an exact match .
func runtv(tpl, expect string, vars interface{}) error {
	fmap := GenericFuncMap()
	t := template.Must(template.New("test").Funcs(fmap).Parse(tpl))
	var b bytes.Buffer
	err := t.Execute(&b, vars)
	if err != nil {
		return err
	}
	if expect != b.String() {
		return fmt.Errorf("Expected '%s', got '%s'", expect, b.String())
	}
	return nil
}
func runtv ( tpl , expect string , vars interface { } ) error { fmap := GenericFuncMap ( ) t := template . Must ( template . New ( " " ) . Funcs ( fmap ) . Parse ( tpl ) ) var b bytes . Buffer err := t . Execute ( & b , vars ) if err != nil { return err } if expect != b . String ( ) { return fmt . Errorf ( " " , expect , b . String ( ) ) } return nil }
runtv takes a template, and expected return, and values for substitution.
runtv takes a template and expected return and values for substitution .