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

Function multiSelectSurvey

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

Source from the content-addressed store, hash-verified

626}
627
628func multiSelectSurvey(p EditPrompter, message string, defaults, options []string) (results []string, err error) {
629 if len(options) == 0 {
630 return nil, nil
631 }
632
633 var selected []int
634 selected, err = p.MultiSelect(message, defaults, options)
635 if err != nil {
636 return
637 }
638
639 for _, i := range selected {
640 results = append(results, options[i])
641 }
642
643 return results, err
644}
645
646func milestoneSurvey(p EditPrompter, title string, opts []string) (result string, err error) {
647 if len(opts) == 0 {

Callers 2

EditFieldsSurveyFunction · 0.85
FieldsToEditSurveyFunction · 0.85

Calls 1

MultiSelectMethod · 0.65

Tested by

no test coverage detected