1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-23 03:45:56 +00:00

Available is never returns false, just re-allocate on .Close - test https://github.com/iris-contrib/tests/blob/master/server_test.go

This commit is contained in:
Makis Maropoulos
2016-07-03 02:01:48 +02:00
parent 160b8d9545
commit 1354b74822
4 changed files with 25 additions and 23 deletions

View File

@@ -123,7 +123,7 @@ func (e *Engine) ExecuteWriter(out io.Writer, name string, binding interface{},
isLayout := false
renderFilename := name
if layout != "" && layout != config.NoLayout {
if layout != "" {
isLayout = true
renderFilename = layout // the render becomes the layout, and the name is the partial.
}

View File

@@ -233,7 +233,7 @@ func (s *Engine) runtimeFuncsFor(name string, binding interface{}) {
// ExecuteWriter executes a templates and write its results to the out writer
func (s *Engine) ExecuteWriter(out io.Writer, name string, binding interface{}, layout string) error {
if layout != "" && layout != config.NoLayout {
if layout != "" {
s.layoutFuncsFor(name, binding)
name = layout