BUGFIX: race condition in engine; index page controller

This commit is contained in:
Simon Martens
2025-03-24 15:30:07 +01:00
parent 66fedf4baf
commit 4bff7fb17a
39 changed files with 59138 additions and 302 deletions

View File

@@ -100,7 +100,7 @@ func (e *Engine) setDebugData() {
e.mu.Lock()
defer e.mu.Unlock()
e.debug = true
e.GlobalData["debug"] = true
e.GlobalData["isDev"] = true
e.GlobalData["debugport"] = WS_SERVER
}
@@ -121,6 +121,8 @@ func (e *Engine) funcs() error {
// Passing HTML
e.AddFunc("Safe", functions.Safe)
e.AddFunc("Today", functions.Today)
e.AddFunc("GetMonth", functions.GetMonth)
return nil
}
@@ -159,9 +161,9 @@ func (e *Engine) Load() error {
func (e *Engine) Reload() {
e.regmu.Lock()
defer e.regmu.Unlock()
e.LayoutRegistry = e.LayoutRegistry.Reset()
e.TemplateRegistry = e.TemplateRegistry.Reset()
e.regmu.Unlock()
e.Load()
}