1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-24 12:25:57 +00:00

Fix the call to pointer on .UseTemplate(...).Directory(..).Binary(...)

This commit is contained in:
Gerasimos Maropoulos
2016-07-26 18:36:03 +03:00
parent 83c3eb216e
commit 5579153614
3 changed files with 4 additions and 9 deletions

View File

@@ -472,7 +472,7 @@ func (ctx *Context) Gzip(b []byte, status int) {
// Note: the options: "gzip" and "charset" are built'n support by Iris, so you can pass these on any template engine or response engine
func (ctx *Context) RenderWithStatus(status int, name string, binding interface{}, options ...map[string]interface{}) error {
ctx.SetStatusCode(status)
if strings.IndexByte(name, '.') > 0 { //we have template
if strings.IndexByte(name, '.') > -1 { //we have template
return ctx.framework.templates.getBy(name).execute(ctx, name, binding, options...)
}
return ctx.framework.responses.getBy(name).render(ctx, binding, options...)