1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

Developers can ignore this update. Replace the template engines with a new cross-framework package (kataras/go-template)

This commit is contained in:
Gerasimos Maropoulos
2016-09-02 06:05:44 +03:00
parent 6163726bc5
commit c38a9b2459
8 changed files with 46 additions and 271 deletions

View File

@@ -4,6 +4,7 @@ import (
"strings"
"github.com/kataras/go-errors"
"github.com/kataras/go-template"
"github.com/valyala/fasthttp"
)
@@ -139,10 +140,8 @@ func (r *responseEngineMap) render(ctx *Context, obj interface{}, options ...map
gzipEnabled := ctx.framework.Config.Gzip
charset := ctx.framework.Config.Charset
if len(options) > 0 {
gzipEnabled = getGzipOption(ctx, options[0]) // located to the template.go below the RenderOptions
if chs := getCharsetOption(options[0]); chs != "" {
charset = chs
}
gzipEnabled = template.GetGzipOption(gzipEnabled, options[0]) // located to the template.go below the RenderOptions
charset = template.GetCharsetOption(charset, options[0])
}
ctype := r.contentType