// withText adds text to a node and returns it.
withText adds text to a node and returns it.
// withText adds text to a node and returns it .
func withText(node *html.Node, text string) *html.Node {
	if node.Type != html.ElementNode {
		panic("not an element node")
	}
	node.AppendChild(&html.Node{
		Type: html.TextNode,
		Data: text,
	})
	return node
}
func withText ( node * html . Node , text string ) * html . Node { if node . Type != html . ElementNode { panic ( " " ) } node . AppendChild ( & html . Node { Type : html . TextNode , Data : text , } ) return node }
withText adds text to a node and returns it.
withText adds text to a node and returns it .