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