From 7cf7cb52c95f08e5cee4f79727aa037733259d2b Mon Sep 17 00:00:00 2001 From: Achim Rohn Date: Wed, 13 Aug 2025 11:36:30 +0200 Subject: [PATCH] Render default route on "/" --- htmx_route.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htmx_route.go b/htmx_route.go index ab08d11..c06e25e 100644 --- a/htmx_route.go +++ b/htmx_route.go @@ -89,6 +89,7 @@ type HtmxRoute interface { GetHtmx(language Language, queryParams ...HtmxPathParam) gomponents.Node SetActivePath(activePath *ActivePath) HtmxRoute Add(server *http.ServeMux) + Execute(c HtmxContext) } func addLanguageToPath(path string, language Language) string { @@ -102,6 +103,10 @@ type HtmxGetRoute struct { ActivePath *ActivePath } +func (h HtmxGetRoute) Execute(c HtmxContext) { + h.RouteFunc(c) +} + func (h HtmxGetRoute) SetActivePath(activePath *ActivePath) HtmxRoute { h.ActivePath = activePath return h