Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a node in a tree
func NewNode ¶
func NewNode(v interface{}) *Node
NewNode creates a new Node with value v and returns a pointer to that node
func (*Node) GetChildren ¶
GetChildren returns list of node n's successors
func (Node) MarshalJSON ¶
MarshalJSON implements Marshaler interface It returns Node in JSON format
func (*Node) SetChildren ¶
SetChildren sets children of a node n
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree represents a tree
func (Tree) MarshalJSON ¶
MarshalJSON implements Marshaler interface It returns Tree in JSON format
Click to show internal directories.
Click to hide internal directories.