1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 05:25:58 +00:00
Makis Maropoulos
2016-06-02 18:27:35 +03:00
parent 7f82b101c7
commit 56a9fba34d
2 changed files with 13 additions and 3 deletions

View File

@@ -125,12 +125,12 @@ type (
// Right delimeter, default is }}
Right string
// Funcs like html/template
Funcs template.FuncMap
Funcs map[string]interface{}
// Funcs like html/template
// the difference from Funcs is that these funcs
// can be used inside a layout and can override the predefined (yield,partial...) or add more custom funcs
// these can override the Funcs inside no-layout templates also, use it when you know what you're doing
LayoutFuncs template.FuncMap
LayoutFuncs map[string]interface{}
}
// Pongo the configs for PongoEngine
Pongo struct {
@@ -207,7 +207,7 @@ func DefaultTemplate() Template {
ContentType: "text/html",
Charset: "UTF-8",
Layout: "", // currently this is the only config which not working for pongo2 yet but I will find a way
HTMLTemplate: HTMLTemplate{Left: "{{", Right: "}}", Funcs: template.FuncMap{}, LayoutFuncs: template.FuncMap{}},
HTMLTemplate: HTMLTemplate{Left: "{{", Right: "}}", Funcs: make(map[string]interface{}, 0), LayoutFuncs: make(map[string]interface{}, 0)},
Pongo: Pongo{Filters: make(map[string]pongo2.FilterFunction, 0), Globals: make(map[string]interface{}, 0)},
Markdown: Markdown{Sanitize: false},
Amber: Amber{Funcs: template.FuncMap{}},