From 495e7596895284b6e1798084b64a2e9d5d50f1c3 Mon Sep 17 00:00:00 2001 From: maddalax Date: Thu, 21 Nov 2024 07:29:51 -0600 Subject: [PATCH] remove from pages as its not needed --- examples/minimal-htmgo/{pages => }/index.go | 2 +- examples/minimal-htmgo/main.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) rename examples/minimal-htmgo/{pages => }/index.go (98%) 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)