Documentation ¶
Overview ¶
Package tag provides the data type for (X)HTML tags/DOM nodes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tag ¶
type Tag struct {
// contains filtered or unexported fields
}
Tag represents an HTML tag/DOM node.
func (Tag) WithAttrs ¶ added in v3.2.0
WithAttrs return the tag but with the given attributes. Previous attributes of the tag are discarded.
This is a no-op for wrapper tags.
func (Tag) WithChildren ¶ added in v3.2.0
WithChildren returns the tag but with the given children. Previous children of the tag are discarded.
This is a no-op for unclosed tags.
func (Tag) WithContentsLines ¶ added in v3.2.0
WithContentsLines returns the tag but with the given lines of contents.
Contents is like children, but just text, not tags.
This is a no-op for unclosed tags.
func (Tag) WithContentsStrings ¶ added in v3.2.0
WithContentsStrings is like WithContentsLines but it wraps strings into indented lines for you.