all repos — gomponents @ 108f8d9ba564aef06155f6fdc83e140bb5953b3d

HTML components in pure Go

Add NodeType which replaces the Placer interface (#45) The `Placer` interface was a weird interface that tried to abstract away nodes being elements or attributes, but it doesn't really make sense. Now `Nodes` just have a `NodeType`.

Markus Wüstenberg
commit

108f8d9ba564aef06155f6fdc83e140bb5953b3d

parent

794c3b26acbd3931b7973ff7e09a42b0ac414b1c

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

changed files
M attr/attributes.goattr/attributes.go
@@ -26,8 +26,8 @@ sort.Strings(included)
return g.Attr("class", strings.Join(included, " ")).Render(w) } -func (c Classes) Place() g.Placement { - return g.Inside +func (c Classes) Type() g.NodeType { + return g.AttributeType } // String satisfies fmt.Stringer.