From d9434f49abd72980b59e9140f9666b15fb368191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 23 Jan 2024 16:17:44 -0800 Subject: [PATCH] some cleanup in render.go --- internal/render/render.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/render/render.go b/internal/render/render.go index fbbaf4e..28b0d7a 100644 --- a/internal/render/render.go +++ b/internal/render/render.go @@ -107,14 +107,12 @@ func RenderTemplate(w http.ResponseWriter, filename string) { if err == nil { app.Logger.Debug(fmt.Sprintf("Loaded data for template %s.", filename), "data", data) if _, ok := data.StringMap["GeneratedAt"]; !ok { - data.StringMap["GeneratedAt"] = app.TemplateCache.Cache[filename].GeneratedAt.Format(time.UnixDate) + data.StringMap["GeneratedAt"] = template.GeneratedAt.Format(time.UnixDate) } } else { app.Logger.Info(fmt.Sprintf("Loading template data for %s failed, using default template data.", filename), "err", err) data = models.MakeBasicTemplateData(template.GeneratedAt) } - l := data.LinkMap["Personal"] - app.Logger.Debugf("%[1]v is %[1]T", l) // Execute templates in a new buffer buf := new(bytes.Buffer)