MCPcopy
hub / github.com/lxn/walk / insertIntoSlice

Method insertIntoSlice

widgetlist.go:95–99  ·  view source on GitHub ↗
(index int, item Widget)

Source from the content-addressed store, hash-verified

93}
94
95func (l *WidgetList) insertIntoSlice(index int, item Widget) {
96 l.items = append(l.items, nil)
97 copy(l.items[index+1:], l.items[index:])
98 l.items[index] = item.AsWidgetBase()
99}
100
101func (l *WidgetList) Insert(index int, item Widget) error {
102 if l.Contains(item) {

Callers 2

InsertMethod · 0.95
RemoveAtMethod · 0.95

Calls 1

AsWidgetBaseMethod · 0.65

Tested by

no test coverage detected