about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarkus Wüstenberg2024-10-03 11:32:52 +0200
committerGitHub2024-10-03 11:32:52 +0200
commitc094266ccbc2cb4ebac4e2f2f6f9aee5c5740db8 (patch)
tree00a6112bbe2907ff0aa1f3b3b3ea186dd73ed368
parentfe24f0575214093cc72201ecc1cc463865dcb1e2 (diff)
downloadgomponents-c094266ccbc2cb4ebac4e2f2f6f9aee5c5740db8.tar.lz
gomponents-c094266ccbc2cb4ebac4e2f2f6f9aee5c5740db8.tar.zst
gomponents-c094266ccbc2cb4ebac4e2f2f6f9aee5c5740db8.zip
Fix example app to use maragu.dev/gomponents module path (#216)
-rw-r--r--internal/examples/app/cmd/app/main.go2
-rw-r--r--internal/examples/app/go.mod2
-rw-r--r--internal/examples/app/go.sum4
-rw-r--r--internal/examples/app/html/about.go4
-rw-r--r--internal/examples/app/html/components.go6
-rw-r--r--internal/examples/app/html/home.go6
-rw-r--r--internal/examples/app/http/pages.go8
7 files changed, 16 insertions, 16 deletions
diff --git a/internal/examples/app/cmd/app/main.go b/internal/examples/app/cmd/app/main.go
index 0c01576..5dad32a 100644
--- a/internal/examples/app/cmd/app/main.go
+++ b/internal/examples/app/cmd/app/main.go
@@ -8,6 +8,6 @@ import (
 
 func main() {
 	if err := http.Start(); err != nil {
-		slog.Info("Error", 1, "error", err)
+		slog.Info("Error starting", "error", err)
 	}
 }
diff --git a/internal/examples/app/go.mod b/internal/examples/app/go.mod
index a86bad6..a234275 100644
--- a/internal/examples/app/go.mod
+++ b/internal/examples/app/go.mod
@@ -2,4 +2,4 @@ module app
 
 go 1.23.1
 
-require github.com/maragudk/gomponents v0.20.5
+require maragu.dev/gomponents v0.22.1-0.20241003092644-fe24f0575214
diff --git a/internal/examples/app/go.sum b/internal/examples/app/go.sum
index 37a89f1..6a8ac6d 100644
--- a/internal/examples/app/go.sum
+++ b/internal/examples/app/go.sum
@@ -1,2 +1,2 @@
-github.com/maragudk/gomponents v0.20.5 h1:Z8phdQIW+NqAGO0clMh/wyv1/M7viUBf7/EL44gvwtI=
-github.com/maragudk/gomponents v0.20.5/go.mod h1:nHkNnZL6ODgMBeJhrZjkMHVvNdoYsfmpKB2/hjdQ0Hg=
+maragu.dev/gomponents v0.22.1-0.20241003092644-fe24f0575214 h1:bNGcux5RpG5WWQby69VsE0GexUxryln8ltlfdaf06oI=
+maragu.dev/gomponents v0.22.1-0.20241003092644-fe24f0575214/go.mod h1:oEDahza2gZoXDoDHhw8jBNgH+3UR5ni7Ur648HORydM=
diff --git a/internal/examples/app/html/about.go b/internal/examples/app/html/about.go
index 37b797f..61a5001 100644
--- a/internal/examples/app/html/about.go
+++ b/internal/examples/app/html/about.go
@@ -3,8 +3,8 @@ package html
 import (
 	"time"
 
-	. "github.com/maragudk/gomponents"
-	. "github.com/maragudk/gomponents/html"
+	. "maragu.dev/gomponents"
+	. "maragu.dev/gomponents/html"
 )
 
 func AboutPage() Node {
diff --git a/internal/examples/app/html/components.go b/internal/examples/app/html/components.go
index 25880a3..ad5d582 100644
--- a/internal/examples/app/html/components.go
+++ b/internal/examples/app/html/components.go
@@ -1,9 +1,9 @@
 package html
 
 import (
-	. "github.com/maragudk/gomponents"
-	. "github.com/maragudk/gomponents/components"
-	. "github.com/maragudk/gomponents/html"
+	. "maragu.dev/gomponents"
+	. "maragu.dev/gomponents/components"
+	. "maragu.dev/gomponents/html"
 )
 
 func page(title string, children ...Node) Node {
diff --git a/internal/examples/app/html/home.go b/internal/examples/app/html/home.go
index a3d729b..c06aa66 100644
--- a/internal/examples/app/html/home.go
+++ b/internal/examples/app/html/home.go
@@ -1,8 +1,8 @@
 package html
 
 import (
-	. "github.com/maragudk/gomponents"
-	. "github.com/maragudk/gomponents/html"
+	. "maragu.dev/gomponents"
+	. "maragu.dev/gomponents/html"
 )
 
 func HomePage(items []string) Node {
@@ -11,7 +11,7 @@ func HomePage(items []string) Node {
 
 		P(Text("This is a gomponents example app!")),
 
-		P(Raw(`Have a look at the <a href="https://github.com/maragudk/gomponents/tree/main/internal/examples/app">source code</a> to see how it’s structured.`)),
+		P(Raw(`Have a look at the <a href="https://maragu.dev/gomponents/tree/main/internal/examples/app">source code</a> to see how it’s structured.`)),
 
 		Ul(Map(items, func(s string) Node {
 			return Li(Text(s))
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
 	}))
 }