MCPcopy Index your code
hub / github.com/coder/coder / filteredOptions

Method filteredOptions

cli/cliui/select.go:698–709  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

696}
697
698func (m multiSelectModel) filteredOptions() []*multiSelectOption {
699 options := []*multiSelectOption{}
700 for _, o := range m.options {
701 filter := strings.ToLower(m.search.Value())
702 option := strings.ToLower(o.option)
703
704 if strings.Contains(option, filter) {
705 options = append(options, o)
706 }
707 }
708 return options
709}
710
711func (m multiSelectModel) selectedOptions() []string {
712 selected := []string{}

Callers 3

UpdateMethod · 0.95
getMaxIndexMethod · 0.95
ViewMethod · 0.95

Calls 2

ValueMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected