mirror of
https://github.com/kataras/iris.git
synced 2025-03-13 21:36:28 +01:00
Fix the call to pointer on .UseTemplate(...).Directory(..).Binary(...)
This commit is contained in:
parent
83c3eb216e
commit
5579153614
|
@ -21,17 +21,12 @@
|
|||
<a href="#"><img src="https://img.shields.io/badge/platform-Any--OS-yellow.svg?style=flat-square" alt="Platforms"></a>
|
||||
<br/><br/>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
The <a href="https://github.com/kataras/iris#benchmarks">fastest</a> backend web framework, written entirely in Go. <br/>Easy to <a href="https://www.gitbook.com/book/kataras/iris/details">learn</a>, while it's highly customizable. <br/>
|
||||
Ideally suited for both experienced and novice Developers. <br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p style="background-color:#BEC6D0;height:0.2px;width:100%" ></p>
|
||||
</p>
|
||||
|
||||
|
||||
Installation
|
||||
|
|
|
@ -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...)
|
||||
|
|
|
@ -103,10 +103,10 @@ type (
|
|||
|
||||
// Directory sets the directory to load from
|
||||
// returns the Binary location which is optional
|
||||
func (t *TemplateEngineLocation) Directory(dir string, fileExtension string) TemplateEngineBinaryLocation {
|
||||
func (t *TemplateEngineLocation) Directory(dir string, fileExtension string) *TemplateEngineBinaryLocation {
|
||||
t.directory = dir
|
||||
t.extension = fileExtension
|
||||
return TemplateEngineBinaryLocation{location: t}
|
||||
return &TemplateEngineBinaryLocation{location: t}
|
||||
}
|
||||
|
||||
// Binary sets the asset(s) and asssets names to load from, works with Directory
|
||||
|
|
Loading…
Reference in New Issue
Block a user