mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 09:57:01 +00:00
formatting
Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
This commit is contained in:
12
view/html.go
12
view/html.go
@@ -269,10 +269,10 @@ func (s *HTMLEngine) loadDirectory() error {
|
||||
templateErr = err
|
||||
return err
|
||||
}
|
||||
//s.mu.Lock()
|
||||
// s.mu.Lock()
|
||||
// Add our funcmaps.
|
||||
_, err = tmpl.Funcs(emptyFuncs).Funcs(s.funcs).Parse(contents)
|
||||
//s.mu.Unlock()
|
||||
// s.mu.Unlock()
|
||||
if err != nil {
|
||||
templateErr = err
|
||||
return err
|
||||
@@ -409,10 +409,10 @@ func (s *HTMLEngine) layoutFuncsFor(name string, binding interface{}) {
|
||||
}
|
||||
return "", nil
|
||||
},
|
||||
//partial related to current page,
|
||||
//it would be easier for adding pages' style/script inline
|
||||
//for example when using partial_r '.script' in layout.html
|
||||
//templates/users/index.html would load templates/users/index.script.html
|
||||
// partial related to current page,
|
||||
// it would be easier for adding pages' style/script inline
|
||||
// for example when using partial_r '.script' in layout.html
|
||||
// templates/users/index.html would load templates/users/index.script.html
|
||||
"partial_r": func(partialName string) (template.HTML, error) {
|
||||
ext := filepath.Ext(name)
|
||||
root := name[:len(name)-len(ext)]
|
||||
|
||||
Reference in New Issue
Block a user