MCPcopy Index your code
hub / github.com/lxn/walk / Index

Method Index

widgetlist.go:65–75  ·  view source on GitHub ↗
(item Widget)

Source from the content-addressed store, hash-verified

63}
64
65func (l *WidgetList) Index(item Widget) int {
66 wb := item.AsWidgetBase()
67
68 for i, widget := range l.items {
69 if widget == wb {
70 return i
71 }
72 }
73
74 return -1
75}
76
77func (l *WidgetList) Contains(item Widget) bool {
78 return l.Index(item) > -1

Callers 2

ContainsMethod · 0.95
RemoveMethod · 0.95

Calls 1

AsWidgetBaseMethod · 0.65

Tested by

no test coverage detected