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: 4 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址