(item Widget)
| 127 | } |
| 128 | |
| 129 | func (l *WidgetList) Remove(item Widget) error { |
| 130 | index := l.Index(item) |
| 131 | if index == -1 { |
| 132 | return nil |
| 133 | } |
| 134 | |
| 135 | return l.RemoveAt(index) |
| 136 | } |
| 137 | |
| 138 | func (l *WidgetList) RemoveAt(index int) error { |
| 139 | item := l.items[index] |