MCPcopy
hub / github.com/cli/cli / FindSelected

Method FindSelected

pkg/cmd/extension/browse/browse.go:276–287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

274}
275
276func (el *extList) FindSelected() (extEntry, int) {
277 if el.ui.List.GetItemCount() == 0 {
278 return extEntry{}, -1
279 }
280 title, desc := el.ui.List.GetItemText(el.ui.List.GetCurrentItem())
281 for x, e := range el.extEntries {
282 if e.Title() == title && e.Description() == desc {
283 return e, x
284 }
285 }
286 return extEntry{}, -1
287}
288
289func (el *extList) Filter(text string) {
290 el.filter = text

Callers 4

toggleSelectedMethod · 0.95
getSelectedReadmeFunction · 0.80
ExtBrowseFunction · 0.80
Test_extListFunction · 0.80

Calls 2

DescriptionMethod · 0.80
TitleMethod · 0.65

Tested by 1

Test_extListFunction · 0.64