mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 03:01:03 +01:00
ed45c77be5
Former-commit-id: ed635ee95de7160cde11eaabc0c1dcb0e460a620
15 lines
398 B
Go
15 lines
398 B
Go
package controllers
|
|
|
|
import (
|
|
"github.com/kataras/iris/v12/_examples/response-writer/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)
|
|
}
|