MCPcopy
hub / github.com/g3n/engine / AddNode

Method AddNode

gui/tree.go:101–108  ·  view source on GitHub ↗

AddNode adds a new tree node with the specified text at the end of this tree and returns a pointer to the new node.

(text string)

Source from the content-addressed store, hash-verified

99// AddNode adds a new tree node with the specified text
100// at the end of this tree and returns a pointer to the new node.
101func (t *Tree) AddNode(text string) *TreeNode {
102
103 n := newTreeNode(text, t, nil)
104 n.update()
105 n.recalc()
106 n.litem = t.List.Add(n)
107 return n
108}
109
110// Remove removes the specified child from the tree or any
111// of its children nodes.

Callers 2

buildTreeFunction · 0.95
AddGroupMethod · 0.45

Calls 4

newTreeNodeFunction · 0.85
updateMethod · 0.45
recalcMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected