DeleteChildByName deletes child node by name, returning false if it can not find it.
(name string)
| 361 | // DeleteChildByName deletes child node by name, returning false |
| 362 | // if it can not find it. |
| 363 | func (n *NodeBase) DeleteChildByName(name string) bool { |
| 364 | idx := IndexByName(n.Children, name) |
| 365 | if idx < 0 { |
| 366 | return false |
| 367 | } |
| 368 | return n.DeleteChildAt(idx) |
| 369 | } |
| 370 | |
| 371 | // DeleteChildren deletes all children nodes. |
| 372 | func (n *NodeBase) DeleteChildren() { |