diff --git a/examples/minimal-htmgo/pages/index.go b/examples/minimal-htmgo/index.go similarity index 98% rename from examples/minimal-htmgo/pages/index.go rename to examples/minimal-htmgo/index.go index a98048d..de0b439 100644 --- a/examples/minimal-htmgo/pages/index.go +++ b/examples/minimal-htmgo/index.go @@ -1,4 +1,4 @@ -package pages +package main import ( "github.com/maddalax/htmgo/framework/h" diff --git a/examples/minimal-htmgo/main.go b/examples/minimal-htmgo/main.go index 8a65edd..2fabc1c 100644 --- a/examples/minimal-htmgo/main.go +++ b/examples/minimal-htmgo/main.go @@ -2,7 +2,6 @@ package main import ( "github.com/go-chi/chi/v5" - "minimal-htmgo/pages" "net/http" ) @@ -13,11 +12,11 @@ func main() { router.Handle("/public/*", fileServer) router.Get("/", func(writer http.ResponseWriter, request *http.Request) { - RenderPage(request, writer, pages.Index) + RenderPage(request, writer, Index) }) router.Get("/current-time", func(writer http.ResponseWriter, request *http.Request) { - RenderPartial(request, writer, pages.CurrentTime) + RenderPartial(request, writer, CurrentTime) }) http.ListenAndServe(":3000", router)