From 36829887c362c58b06ca4e5adea789ee9552d2f3 Mon Sep 17 00:00:00 2001 From: Mikkel Thestrup Date: Wed, 24 Dec 2025 12:42:45 +0100 Subject: I hate go formatting --- internal/handlers.go | 15 +++++++++++---- internal/models.go | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'internal') diff --git a/internal/handlers.go b/internal/handlers.go index c151904..92f7a4f 100644 --- a/internal/handlers.go +++ b/internal/handlers.go @@ -46,7 +46,8 @@ func (s *Server) handleHTMXPage(c echo.Context) error { log.Printf("Error rendering content for %s: %v", page, err) return c.String( http.StatusInternalServerError, - "Error loading content") + "Error loading content", + ) } data := PageData { @@ -79,10 +80,14 @@ func (s *Server) renderFullPage(c echo.Context, page, section string) error { if err != nil { log.Printf( "Error rendering content for %s/%s: %v", - page, section, err) + page, + section, + err, + ) return c.String( http.StatusInternalServerError, - "Error loading content") + "Error loading content", + ) } data := PageData{ @@ -100,7 +105,9 @@ func (s *Server) renderContent(c echo.Context, page, section string) error { if err != nil { log.Printf("Error rendering content for %s/%s: %v", page, section, err) return c.String( - http.StatusInternalServerError, "Error loading content") + http.StatusInternalServerError, + "Error loading content", + ) } return c.HTML(http.StatusOK, string(content)) diff --git a/internal/models.go b/internal/models.go index 4c8b4e0..097b852 100644 --- a/internal/models.go +++ b/internal/models.go @@ -9,14 +9,14 @@ const ( PageContact = "contact" ) -var ValidPages = []string{ +var ValidPages = []string { PageHome, PageProjects, PageResume, PageContact, } -var PageSections = map[string][]string{ +var PageSections = map[string][]string { PageHome: {"intro", "about"}, PageProjects: {"intro", "kal"}, PageResume: {"intro", "BSc Comp. Sci."}, -- cgit v1.2.3-70-g09d2