(child *BasicEntity)
| 72 | } |
| 73 | |
| 74 | func (e *BasicEntity) RemoveChild(child *BasicEntity) { |
| 75 | delete := -1 |
| 76 | for i, v := range e.children { |
| 77 | if v.ID() == child.ID() { |
| 78 | delete = i |
| 79 | break |
| 80 | } |
| 81 | } |
| 82 | if delete >= 0 { |
| 83 | e.children = append(e.children[:delete], e.children[delete+1:]...) |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | // Children returns the children of the BasicEntity |
| 88 | func (e *BasicEntity) Children() []BasicEntity { |