diff options
Diffstat (limited to 'utils/html.go')
-rw-r--r-- | utils/html.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/html.go b/utils/html.go index 4203160d5..e89cb12a0 100644 --- a/utils/html.go +++ b/utils/html.go @@ -23,7 +23,16 @@ type HTMLTemplate struct { } func InitHTML() { - templatesDir := FindDir("templates") + InitHTMLWithDir("templates") +} + +func InitHTMLWithDir(dir string) { + + if htmlTemplates != nil { + return + } + + templatesDir := FindDir(dir) l4g.Debug(T("api.api.init.parsing_templates.debug"), templatesDir) var err error if htmlTemplates, err = template.ParseGlob(templatesDir + "*.html"); err != nil { |