1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-26 05:15:56 +00:00

🎄 Merry Christmas everyone

minor fixes
This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-12-26 00:01:01 +02:00
parent e213dba0d3
commit 62a1829cb9
6 changed files with 20 additions and 8 deletions

View File

@@ -212,7 +212,7 @@ func (s *HandlebarsEngine) ExecuteWriter(w io.Writer, filename string, layout st
if m, is := binding.(map[string]interface{}); is { // handlebars accepts maps,
context = m
} else {
return fmt.Errorf("Please provide a map[string]interface{} type as the binding instead of the %#v", binding)
return fmt.Errorf("please provide a map[string]interface{} type as the binding instead of the %#v", binding)
}
contents, err := s.executeTemplateBuf(filename, binding)
@@ -235,5 +235,9 @@ func (s *HandlebarsEngine) ExecuteWriter(w io.Writer, filename string, layout st
return err
}
return ErrNotExist{fmt.Sprintf("%s (file: %s)", renderFilename, filename), false, bindingData}
return ErrNotExist{
Name: fmt.Sprintf("%s (file: %s)", renderFilename, filename),
IsLayout: false,
Data: bindingData,
}
}