1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

fix https://github.com/kataras/iris/issues/1450 and continue on implementing 1449

Former-commit-id: 617f64d061e88f050a443ea1751fa244164656c5
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-02-14 23:34:56 +02:00
parent 09a410c6cb
commit c13fd84354
24 changed files with 581 additions and 144 deletions

View File

@@ -340,7 +340,7 @@ func (s *HTMLEngine) loadAssets() error {
rel, err := filepath.Rel(virtualDirectory, path)
if err != nil {
templateErr = err
continue
break
}
// // take the current working directory
@@ -358,7 +358,7 @@ func (s *HTMLEngine) loadAssets() error {
buf, err := assetFn(path)
if err != nil {
templateErr = fmt.Errorf("%v for path '%s'", err, path)
continue
break
}
contents := string(buf)
@@ -372,14 +372,14 @@ func (s *HTMLEngine) loadAssets() error {
contents, err = s.middleware(name, buf)
if err != nil {
templateErr = fmt.Errorf("%v for name '%s'", err, name)
continue
break
}
}
// Add our funcmaps.
if _, err = tmpl.Funcs(emptyFuncs).Funcs(s.funcs).Parse(contents); err != nil {
templateErr = err
continue
break
}
}
}