summaryrefslogtreecommitdiff
path: root/internal/handlers.go
diff options
context:
space:
mode:
authorMikkel Thestrup <mikkel@mithe.dk>2025-12-24 12:42:45 +0100
committerMikkel Thestrup <mikkel@mithe.dk>2025-12-24 12:42:45 +0100
commit36829887c362c58b06ca4e5adea789ee9552d2f3 (patch)
tree92cd787e476fb3ac6a1b91c7b4846a7931f06de4 /internal/handlers.go
parent67c0494af3863887f3e2b6f6930fdace571606ad (diff)
downloadweb-portfolio-36829887c362c58b06ca4e5adea789ee9552d2f3.tar.gz
web-portfolio-36829887c362c58b06ca4e5adea789ee9552d2f3.zip
I hate go formattingHEADmaster
Diffstat (limited to '')
-rw-r--r--internal/handlers.go15
1 files changed, 11 insertions, 4 deletions
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))