(p prompter.Prompter, io *iostreams.IOStreams)
| 142 | } |
| 143 | |
| 144 | func runMultiSelect(p prompter.Prompter, io *iostreams.IOStreams) error { |
| 145 | fmt.Fprintln(io.Out, "Demonstrating Multi Select") |
| 146 | cuisines := []string{"Italian", "Greek", "Indian", "Japanese", "American"} |
| 147 | favorites, err := p.MultiSelect("Favorite cuisines?", []string{}, cuisines) |
| 148 | if err != nil { |
| 149 | return err |
| 150 | } |
| 151 | for _, f := range favorites { |
| 152 | fmt.Fprintf(io.Out, "Favorite cuisine: %s\n", cuisines[f]) |
| 153 | } |
| 154 | return nil |
| 155 | } |
| 156 | |
| 157 | func runMultiSelectWithSearch(p prompter.Prompter, io *iostreams.IOStreams) error { |
| 158 | fmt.Fprintln(io.Out, "Demonstrating Multi Select With Search") |
nothing calls this directly
no test coverage detected