InsertChild adds given child at position in children list. The kid node is assumed to not be on another tree (see [MoveToParent]) and the existing name should be unique among children.
(kid Node, index int)
| 326 | // The kid node is assumed to not be on another tree (see [MoveToParent]) |
| 327 | // and the existing name should be unique among children. |
| 328 | func (n *NodeBase) InsertChild(kid Node, index int) { |
| 329 | InitNode(kid) |
| 330 | n.Children = slices.Insert(n.Children, index, kid) |
| 331 | SetParent(kid, n) |
| 332 | } |
| 333 | |
| 334 | // Deleting Children: |
| 335 |
no test coverage detected