xslate.go
func (tx Xslate) Render(name string, vars Vars) (string, error) {
	buf := rbpool.Get()
	defer rbpool.Release(buf)

	err := tx.RenderInto(buf, name, vars)
	if err != nil {
		return "", errors.Wrap(err, "failed to render template")
	}

	return buf.String(), nil
}
func (tx Xslate) Render(name string, vars Vars) (string, error) {
	buf := rbpool.Get()
	defer rbpool.Release(buf)

	err := tx.RenderInto(buf, name, vars)
	if err != nil {
		return "", errors.Wrap(err, "failed to render template")
	}

	return buf.String(), nil
}
// Render loads the template specified by the given name string.
// By default Xslate looks for files in the local file system, and caches
// the generated bytecode too.
//
// If you wish to, for example, load the templates from a database, you can
// change the generated loader object by providing a `ConfigureLoader`
// parameter in the xslate.New() function:
//
//    xslate.New(Args {
//      "ConfigureLoader": func(tx *Xslate, args Args) {
//        tx.Loader = .... // your custom loader
//      },
//    })
//
// `Render()` returns the resulting text from processing the template.
// `err` is nil on success, otherwise it contains an `error` value.