From 6b1205e4f3eb476952df13cbe9e0e0e5047f8012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 23 Jan 2024 13:49:59 -0800 Subject: [PATCH] I don't know why I discarded that when I could've used it --- internal/handlers/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index ed6a43e..c2a1413 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -40,9 +40,9 @@ func Initialise(a *config.AppConfig) { // time the related template was generated func makeBasicTemplateData(name string) models.TemplateData { var strMap map[string]string - if _, ok := app.TemplateCache.Cache[name]; ok { + if cacheItem, ok := app.TemplateCache.Cache[name]; ok { strMap = map[string]string{ - "GeneratedAt": app.TemplateCache.Cache[name].GeneratedAt.Format(time.UnixDate), + "GeneratedAt": cacheItem.GeneratedAt.Format(time.UnixDate), } } else { strMap = make(map[string]string)