package
module
Version:
v0.0.0-...-49cb0b8
Opens a new window with list of versions in this module.
Published: Sep 26, 2017
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
asker
A simple question asking library for Go.
Documentation
¶
Prompt will read from the input until a newline is reached.
type Answer struct {
StringResponse string
BoolResponse bool
Provided bool
}
Answer is what is returned in response to a question when asked it.
Ask will walk over each question and prompt for it, returning all the
answers in an array.
Asker is a struct which can Ask the user for input.
type ChoiceAsker struct {
Choices []string
Question string
}
ChoiceAsker will allow the user to select from a list of options.
Ask implements the Asker interface.
type ConfirmAsker struct {
Question string
Default bool
}
ConfirmAsker will allow the user to select from y/N.
Ask implements the Asker interface.
TextAsker will Ask the user a text based inquiry.
Ask implements the Asker interface.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.