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

Function multiSelectSurvey

pkg/cmd/pr/shared/editable.go:643–659  ·  view source on GitHub ↗
(p EditPrompter, message string, defaults, options []string)

Source from the content-addressed store, hash-verified

641}
642
643func multiSelectSurvey(p EditPrompter, message string, defaults, options []string) (results []string, err error) {
644 if len(options) == 0 {
645 return nil, nil
646 }
647
648 var selected []int
649 selected, err = p.MultiSelect(message, defaults, options)
650 if err != nil {
651 return
652 }
653
654 for _, i := range selected {
655 results = append(results, options[i])
656 }
657
658 return results, err
659}
660
661func milestoneSurvey(p EditPrompter, title string, opts []string) (result string, err error) {
662 if len(opts) == 0 {

Callers 2

EditFieldsSurveyFunction · 0.85
FieldsToEditSurveyFunction · 0.85

Calls 1

MultiSelectMethod · 0.65

Tested by

no test coverage detected