Documentation ¶
Index ¶
- func AppendChild(parent Node, child Node)
- func Debug(n Node) string
- func IsFragment(v Node) bool
- func IterChildElement(ctx context.Context, n Node) <-chan Node
- func RenderToString(w io.Writer, n Node, optFns ...RenderOptionFunc)
- type DisplayNameSetter
- type Element
- func (e *Element) DisplayName() string
- func (e *Element) FirstChild() Node
- func (e *Element) LastChild() Node
- func (e *Element) NextSibling() Node
- func (e *Element) ParentNode() Node
- func (e *Element) PreviousSibling() Node
- func (e *Element) SetDisplayName(name string)
- func (e *Element) SetFirstChild(n Node)
- func (e *Element) SetLastChild(n Node)
- func (e *Element) SetNextSibling(n Node)
- func (e *Element) SetParentNode(n Node)
- func (e *Element) SetPreviousSibling(n Node)
- func (e *Element) String() string
- type Fragment
- type Node
- type RenderOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendChild ¶
func IsFragment ¶
func RenderToString ¶
func RenderToString(w io.Writer, n Node, optFns ...RenderOptionFunc)
Types ¶
type DisplayNameSetter ¶
type DisplayNameSetter interface {
SetDisplayName(name string)
}
type Element ¶
type Element struct { Name string // contains filtered or unexported fields }
func (*Element) DisplayName ¶
func (*Element) FirstChild ¶
func (*Element) NextSibling ¶
func (*Element) ParentNode ¶
func (*Element) PreviousSibling ¶
func (*Element) SetDisplayName ¶
func (*Element) SetFirstChild ¶
func (*Element) SetLastChild ¶
func (*Element) SetNextSibling ¶
func (*Element) SetParentNode ¶
func (*Element) SetPreviousSibling ¶
type Node ¶
type Node interface { DisplayName() string ParentNode() Node FirstChild() Node LastChild() Node PreviousSibling() Node NextSibling() Node SetParentNode(n Node) SetFirstChild(n Node) SetLastChild(n Node) SetPreviousSibling(p Node) SetNextSibling(p Node) }
func InsertBefore ¶
func RemoveChild ¶
type RenderOptionFunc ¶
type RenderOptionFunc = func(w *printer)
func WithPretty ¶
func WithPretty(pretty bool) RenderOptionFunc
func WithPtr ¶
func WithPtr(ptr bool) RenderOptionFunc
Click to show internal directories.
Click to hide internal directories.