From 100ae9e8308f380eeb3c6a5ea7a7e3277483aa43 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Thu, 10 Dec 2020 13:13:10 +0100 Subject: Rename Document to Doctype (#54) --- html/elements.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'html/elements.go') 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 "". -func Document(child g.Node) g.NodeFunc { +// Doctype returns a special kind of Node that prefixes its sibling with the string "". +func Doctype(sibling g.Node) g.NodeFunc { return func(w io.Writer) error { if _, err := w.Write([]byte("")); err != nil { return err } - return child.Render(w) + return sibling.Render(w) } } -- cgit 1.4.1