MCPcopy Index your code
hub / github.com/pterm/pterm / isSelected

Method isSelected

interactive_multiselect_printer.go:331–339  ·  view source on GitHub ↗
(optionText string)

Source from the content-addressed store, hash-verified

329}
330
331func (p *InteractiveMultiselectPrinter) isSelected(optionText string) bool {
332 for _, selectedOption := range p.selectedOptions {
333 if p.Options[selectedOption] == optionText {
334 return true
335 }
336 }
337
338 return false
339}
340
341func (p *InteractiveMultiselectPrinter) selectOption(optionText string) {
342 idx := p.findOptionByText(optionText)

Callers 2

selectOptionMethod · 0.95
renderSelectMenuMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected