diff options
author | =Corey Hulen <corey@hulen.com> | 2016-03-14 16:07:58 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-03-15 18:27:45 -0700 |
commit | 36b17bf99ddd35c0c223722f8b6f4f1c71b2235e (patch) | |
tree | 6bc07d42d19d1d7a5bef26864bb93a1bc91da5f1 /utils/html.go | |
parent | ea3f25924ea64a2dd1e73624c0d30824e1efb240 (diff) | |
download | chat-36b17bf99ddd35c0c223722f8b6f4f1c71b2235e.tar.gz chat-36b17bf99ddd35c0c223722f8b6f4f1c71b2235e.tar.bz2 chat-36b17bf99ddd35c0c223722f8b6f4f1c71b2235e.zip |
PLT-2115 Adding compliance
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 { |