about summary refs log tree commit diff stats
path: root/html/elements_test.go
diff options
context:
space:
mode:
authorMarkus Wüstenberg2021-01-07 10:20:03 +0100
committerGitHub2021-01-07 10:20:03 +0100
commitc899a050c06733965dae8ea686daab36e187ba45 (patch)
treec1fb78147e22eacd98fef576f39b3009ca6f3899 /html/elements_test.go
parentd41c4e5a85362dec7844a9093b43720eb0e70e72 (diff)
downloadgomponents-c899a050c06733965dae8ea686daab36e187ba45.tar.lz
gomponents-c899a050c06733965dae8ea686daab36e187ba45.tar.zst
gomponents-c899a050c06733965dae8ea686daab36e187ba45.zip
Return Node from all helpers instead of NodeFunc (#62)
This makes it clearer that the helpers return a `Node` of any kind, and that the type is not important.

This also streamlines the API, as attribute helpers already return just `Node`.
Diffstat (limited to 'html/elements_test.go')
-rw-r--r--html/elements_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/html/elements_test.go b/html/elements_test.go
index d7bd8bf..83742c4 100644
--- a/html/elements_test.go
+++ b/html/elements_test.go
@@ -28,7 +28,7 @@ func TestDoctype(t *testing.T) {
 }
 
 func TestSimpleElements(t *testing.T) {
-	cases := map[string]func(...g.Node) g.NodeFunc{
+	cases := map[string]func(...g.Node) g.Node{
 		"a":          A,
 		"address":    Address,
 		"article":    Article,
@@ -99,7 +99,7 @@ func TestSimpleElements(t *testing.T) {
 }
 
 func TestSimpleVoidKindElements(t *testing.T) {
-	cases := map[string]func(...g.Node) g.NodeFunc{
+	cases := map[string]func(...g.Node) g.Node{
 		"area":   Area,
 		"base":   Base,
 		"br":     Br,
@@ -124,7 +124,7 @@ func TestSimpleVoidKindElements(t *testing.T) {
 }
 
 func TestTextElements(t *testing.T) {
-	cases := map[string]func(string, ...g.Node) g.NodeFunc{
+	cases := map[string]func(string, ...g.Node) g.Node{
 		"abbr":       Abbr,
 		"b":          B,
 		"caption":    Caption,