MCPcopy Create free account
hub / github.com/SolarLune/masterplan / FindElement

Method FindElement

gui.go:3164–3173  ·  view source on GitHub ↗
(elementName string, wild bool)

Source from the content-addressed store, hash-verified

3162}
3163
3164func (container *Container) FindElement(elementName string, wild bool) MenuElement {
3165 for _, row := range container.Rows {
3166 for name, element := range row.Elements {
3167 if (wild && strings.Contains(name, elementName)) || (!wild && name == elementName) {
3168 return element
3169 }
3170 }
3171 }
3172 return nil
3173}
3174
3175func (container *Container) FindRows(elementName string, wild bool) []*ContainerRow {
3176 found := []*ContainerRow{}

Callers 4

NewMapContentsFunction · 0.45
NewTableContentsFunction · 0.45
mainFunction · 0.45
ConstructMenusFunction · 0.45

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected