1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 11:57:02 +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)

View File

@@ -6,10 +6,12 @@ import (
"github.com/kataras/iris/render/template/engine/html"
)
// Engine the JadeEngine
type Engine struct {
*html.Engine
}
// new creates and returns a new JadeEngine with its configs
func New(cfg config.Template) *Engine {
underline := &Engine{Engine: html.New(cfg)}