Documentation
¶
Overview ¶
Package cite provides constructors and methods for the HTML <cite> element.
The <cite> HTML element is used to mark up the title of a creative work. The reference may be in an abbreviated form according to context-appropriate conventions related to citation metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<cite") TagClose = []byte("</cite>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New creates a new cite element with the given child nodes. Example: cite.New(text.Text("Nineteen Eighty-Four")) Renders: <cite>Nineteen Eighty-Four</cite>
func RawText ¶
func RawText(str string) *element
RawText creates a new cite element with raw text content. Uses text.RawText which is not HTML-escaped. Example: cite.RawText("Nineteen Eighty-Four") Renders: <cite>Nineteen Eighty-Four</cite>
func RawTextf ¶
RawTextf creates a new cite element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: cite.RawTextf("Nineteen %s", "Eighty-Four") Renders: <cite>Nineteen Eighty-Four</cite>
func Static ¶
func Static(str string) *element
Static creates a new cite element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: cite.Static("Nineteen Eighty-Four") Renders: <cite>Nineteen Eighty-Four</cite>