package handlers // ToDo not nessisarily an issue with this file but ✅ internal/handlers/template/ //→ For anything that handles HTTP rendering (RenderError, RenderPage) //✅ internal/helpers/template/ //→ For anything that helps render (TemplateContext, pagination, funcs) // there for bear usages between helpers and handlers //In clean Go architecture (especially following “Package by responsibility”): //Type Responsibility Should access //Helpers / Utilities Pure, stateless logic — e.g. template functions, math, formatters. Shared logic, no config, no HTTP handlers. //Handlers Own an HTTP concern — e.g. routes, rendering responses, returning templates or JSON. Injected dependencies (cfg, db, etc.). Should use helpers, not vice versa. import ( "net/http" templateHelpers "synlotto-website/internal/helpers/template" ) // RenderError delegates to the helper's RenderError, ensuring handlers remain // the entry point for rendering HTTP responses. func (h *Handler) RenderError(w http.ResponseWriter, r *http.Request, statusCode int) { templateHelpers.RenderError(w, r, statusCode) }