mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 03:01:03 +01:00
7bb2223226
Former-commit-id: 84f1e894378a6dfd94e0bf057f4037e35aee0c4f
15 lines
387 B
Go
15 lines
387 B
Go
package controllers
|
|
|
|
import (
|
|
"github.com/kataras/iris/v12/_examples/view/quicktemplate/templates"
|
|
|
|
"github.com/kataras/iris/v12"
|
|
)
|
|
|
|
// ExecuteTemplate renders a "tmpl" partial template to the `context#ResponseWriter`.
|
|
func ExecuteTemplate(ctx iris.Context, tmpl templates.Partial) {
|
|
ctx.Gzip(true)
|
|
ctx.ContentType("text/html")
|
|
templates.WriteTemplate(ctx.ResponseWriter(), tmpl)
|
|
}
|