MCPcopy Index your code
hub / github.com/abiosoft/ishell / toggle

Function toggle

ishell.go:477–484  ·  view source on GitHub ↗
(selected []int, cur int)

Source from the content-addressed store, hash-verified

475}
476
477func toggle(selected []int, cur int) []int {
478 for i, s := range selected {
479 if s == cur {
480 return append(selected[:i], selected[i+1:]...)
481 }
482 }
483 return append(selected, cur)
484}
485
486func (s *Shell) multiChoice(options []string, text string, init []int, multiResults bool) []int {
487 s.multiChoiceActive = true

Callers 1

multiChoiceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected