all repos — gomponents @ c899a050c06733965dae8ea686daab36e187ba45

HTML components in pure Go

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`.

Markus Wüstenberg
commit

c899a050c06733965dae8ea686daab36e187ba45

parent

d41c4e5a85362dec7844a9093b43720eb0e70e72

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M html/elements_test.gohtml/elements_test.go
@@ -28,7 +28,7 @@ })
} 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 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 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,