func (t *Template) CreateTemplate() (string, error) { tpl, err := pongo.FromFile(t.Source, nil) if err != nil { return "", err } ctx := pongo.Context(t.Context) out, err := tpl.Execute(&ctx) if err != nil { return "", err } return *out, nil }
func (tpl PongoTemplate) ExecuteRW(w http.ResponseWriter, ctx map[string]interface{}) error { pctx := pongo.Context(ctx) return tpl.tmpl.ExecuteRW(w, &pctx) }