diff options
author | Markus Wüstenberg | 2024-10-03 11:32:52 +0200 |
---|---|---|
committer | GitHub | 2024-10-03 11:32:52 +0200 |
commit | c094266ccbc2cb4ebac4e2f2f6f9aee5c5740db8 (patch) | |
tree | 00a6112bbe2907ff0aa1f3b3b3ea186dd73ed368 /internal/examples/app/http/pages.go | |
parent | fe24f0575214093cc72201ecc1cc463865dcb1e2 (diff) | |
download | gomponents-c094266ccbc2cb4ebac4e2f2f6f9aee5c5740db8.tar.lz gomponents-c094266ccbc2cb4ebac4e2f2f6f9aee5c5740db8.tar.zst gomponents-c094266ccbc2cb4ebac4e2f2f6f9aee5c5740db8.zip |
Fix example app to use maragu.dev/gomponents module path (#216)
Diffstat (limited to 'internal/examples/app/http/pages.go')
-rw-r--r-- | internal/examples/app/http/pages.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/examples/app/http/pages.go b/internal/examples/app/http/pages.go index dd686c0..b09589b 100644 --- a/internal/examples/app/http/pages.go +++ b/internal/examples/app/http/pages.go @@ -3,14 +3,14 @@ package http import ( "net/http" - g "github.com/maragudk/gomponents" - ghttp "github.com/maragudk/gomponents/http" + . "maragu.dev/gomponents" + ghttp "maragu.dev/gomponents/http" "app/html" ) func Home(mux *http.ServeMux) { - mux.Handle("GET /", ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (g.Node, error) { + mux.Handle("GET /", ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (Node, error) { // Let's pretend this comes from a db or something. items := []string{"Super", "Duper", "Nice"} return html.HomePage(items), nil @@ -18,7 +18,7 @@ func Home(mux *http.ServeMux) { } func About(mux *http.ServeMux) { - mux.Handle("GET /about", ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (g.Node, error) { + mux.Handle("GET /about", ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (Node, error) { return html.AboutPage(), nil })) } |