diff options
author | Markus Wüstenberg | 2020-11-16 12:58:42 +0100 |
---|---|---|
committer | GitHub | 2020-11-16 12:58:42 +0100 |
commit | 108f8d9ba564aef06155f6fdc83e140bb5953b3d (patch) | |
tree | eda8b35771e456d1278e88081f94058bed277a1a /attr | |
parent | 794c3b26acbd3931b7973ff7e09a42b0ac414b1c (diff) | |
download | gomponents-108f8d9ba564aef06155f6fdc83e140bb5953b3d.tar.lz gomponents-108f8d9ba564aef06155f6fdc83e140bb5953b3d.tar.zst gomponents-108f8d9ba564aef06155f6fdc83e140bb5953b3d.zip |
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`.
Diffstat (limited to 'attr')
-rw-r--r-- | attr/attributes.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/attr/attributes.go b/attr/attributes.go index bc157cb..938d762 100644 --- a/attr/attributes.go +++ b/attr/attributes.go @@ -26,8 +26,8 @@ func (c Classes) Render(w io.Writer) error { 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. |