Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<hgroup") TagClose = []byte("</hgroup>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new hgroup element with child nodes (typically a heading and subtitle paragraphs). Example: hgroup.New(h1.Text("Main Title"), p.Text("A subtitle")) Renders: <hgroup><h1>Main Title</h1><p>A subtitle</p></hgroup>
func RawText ¶
func RawText(str string) *element
RawText Creates a new hgroup element with raw text content. Uses text.RawText which is not HTML-escaped. Example: hgroup.RawText("<h2>Title</h2><p>Subtitle</p>") Renders: <hgroup><h2>Title</h2><p>Subtitle</p></hgroup>
func RawTextf ¶
RawTextf Creates a new hgroup element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: hgroup.RawTextf("<h2>%s</h2><p>%s</p>", title, subtitle) Renders: <hgroup><h2>Dashboard</h2><p>A deeper look</p></hgroup>
func Static ¶
func Static(str string) *element
Static Creates a new hgroup element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: hgroup.Static("Heading group") Renders: <hgroup>Heading group</hgroup>