about summary refs log tree commit diff stats
path: root/html/elements.go
diff options
context:
space:
mode:
authorMarkus Wüstenberg2020-12-10 13:13:10 +0100
committerGitHub2020-12-10 13:13:10 +0100
commit100ae9e8308f380eeb3c6a5ea7a7e3277483aa43 (patch)
tree86176f9ef9393e6c06e7b8992b60176f1879fc3a /html/elements.go
parenta76262652b227c95ce140f3698c46f59b79354ac (diff)
downloadgomponents-100ae9e8308f380eeb3c6a5ea7a7e3277483aa43.tar.lz
gomponents-100ae9e8308f380eeb3c6a5ea7a7e3277483aa43.tar.zst
gomponents-100ae9e8308f380eeb3c6a5ea7a7e3277483aa43.zip
Rename Document to Doctype (#54)
Diffstat (limited to 'html/elements.go')
-rw-r--r--html/elements.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/html/elements.go b/html/elements.go
index 8045561..4f1a0ec 100644
--- a/html/elements.go
+++ b/html/elements.go
@@ -14,13 +14,13 @@ func A(href string, children ...g.Node) g.NodeFunc {
 	return g.El("a", g.Attr("href", href), g.Group(children))
 }
 
-// Document returns an special kind of Node that prefixes its child with the string "<!doctype html>".
-func Document(child g.Node) g.NodeFunc {
+// Doctype returns a special kind of Node that prefixes its sibling with the string "<!doctype html>".
+func Doctype(sibling g.Node) g.NodeFunc {
 	return func(w io.Writer) error {
 		if _, err := w.Write([]byte("<!doctype html>")); err != nil {
 			return err
 		}
-		return child.Render(w)
+		return sibling.Render(w)
 	}
 }