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 ¶
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 ¶
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 ¶
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 ¶
WithContentsStrings is like WithContentsLines but it wraps strings into indented lines for you.