MCPcopy Create free account
hub / github.com/cli/cli / FindSelected

Method FindSelected

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

Source from the content-addressed store, hash-verified

268}
269
270func (el *extList) FindSelected() (extEntry, int) {
271 if el.ui.List.GetItemCount() == 0 {
272 return extEntry{}, -1
273 }
274 title, desc := el.ui.List.GetItemText(el.ui.List.GetCurrentItem())
275 for x, e := range el.extEntries {
276 if e.Title() == title && e.Description() == desc {
277 return e, x
278 }
279 }
280 return extEntry{}, -1
281}
282
283func (el *extList) Filter(text string) {
284 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