mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
d697426cb6
Change the new ctx.Compres to ctx.CompressWriter and iris.Compress and iris.CompressReader as one iris.Compression Update the README example (master development branch) Former-commit-id: fb67858fe5be5662b5816df41020c28ff9a8c6f6
15 lines
380 B
Go
15 lines
380 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.CompressWriter(true)
|
|
ctx.ContentType("text/html")
|
|
templates.WriteTemplate(ctx, tmpl)
|
|
}
|