Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<b") TagClose = []byte("</b>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new b element with the given child nodes. Example: b.New(text.Text("This text is important.")) Renders: <b>This text is important.</b>
func RawText ¶
func RawText(str string) *element
RawText Creates a new b element with raw text content. Uses text.RawText which is not HTML-escaped. Example: b.RawText("<em>This text</em> is important.") Renders: <b><em>This text</em> is important.</b>
func RawTextf ¶
RawTextf Creates a new b element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: b.RawTextf("Hello <em>%s</em>", "World") Renders: <b>Hello <em>World</em></b>
func Static ¶
func Static(str string) *element
Static Creates a new b element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: b.Static("Note") Renders: <b>Note</b>