Documentation
¶
Overview ¶
Package search provides constructors and methods for the HTML <search> element.
The <search> HTML element is a container representing the parts of the document or application with form controls or other content related to performing a search or filtering operation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<search") TagClose = []byte("</search>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New creates a new search element with optional child nodes Example: search.New() Renders: <search></search>
func RawText ¶
func RawText(content string) *element
RawText creates a new search element with raw text content. Uses text.RawText which is not HTML-escaped. Example: search.RawText("<b>Find results</b>") Renders: <search><b>Find results</b></search>
func RawTextf ¶
RawTextf creates a new search element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: search.RawTextf("<b>Find %s</b>", "results") Renders: <search><b>Find results</b></search>
func Static ¶
func Static(content string) *element
Static creates a new search element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: search.Static("Find results") Renders: <search>Find results</search>