From b9c0bd863b48f790a51d5764b3e91e66f9f00378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 23 Jan 2024 13:50:55 -0800 Subject: [PATCH] proper template generation time if not in cache --- internal/handlers/handlers.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index c2a1413..9682569 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -45,7 +45,9 @@ func makeBasicTemplateData(name string) models.TemplateData { "GeneratedAt": cacheItem.GeneratedAt.Format(time.UnixDate), } } else { - strMap = make(map[string]string) + strMap = map[string]string{ + "GeneratedAt": time.Now().Format(time.UnixDate), + } } templateData := models.TemplateData{