MultipleChoice

package module
v0.0.0-...-68e9def Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2018 License: MIT Imports: 4 Imported by: 1

README ¶

Go-MultipleChoice godoc

If you're building a CLI application in GO and require the user to make a selection out of given options, you can use this package.

Demo

Install 📦

import (
    "github.com/thewolfnl/go-multiplechoice"
)

Usage 🔘

// Single selection
selection := MultipleChoice.Selection("Select one: ", []string{"option1", "option2", "option3"}])

// Multi selection
selections := MultipleChoice.MultiSelection("Select one: ", []string{"option1", "option2", "option3"}])

Suggestions 💭

Please create an issue if you have a suggestion.

Documentation ¶

Overview ¶

Package MultipleChoice is intended for use in CLI applications

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func MultiSelection ¶

func MultiSelection(question string, options []string) []string

func MultipleChoice ¶

func MultipleChoice(question string, options []string, multiSelect bool) []string

func Selection ¶

func Selection(question string, options []string) string

Selection allows the program to ask a question and give the user several options to chose from, then returning the selected option.

Types ¶

This section is empty.

Directories ¶

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL