1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-19 02:47:04 +00:00
This commit is contained in:
Makis Maropoulos
2016-05-31 11:05:42 +03:00
parent c26668a489
commit 31cbd50fb0
18 changed files with 177 additions and 67 deletions

View File

@@ -49,6 +49,7 @@ func New(c config.Template) *Engine {
return &Engine{Config: &c}
}
// BuildTemplates builds the templates
func (s *Engine) BuildTemplates() error {
if s.Config.Asset == nil || s.Config.AssetNames == nil {
@@ -218,6 +219,7 @@ func (s *Engine) layoutFuncsFor(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 {
s.layoutFuncsFor(name, binding)