Documentation ¶
Index ¶
- func AskForBool(messageToPrint string) (bool, error)
- func AskForBoolFromReader(messageToPrint string, inputReader io.Reader) (bool, error)
- func AskForBoolFromReaderWithDefaultValue(messageToPrint string, defaultValue bool, inputReader io.Reader) (bool, error)
- func AskForBoolWithDefault(messageToPrint string, defaultValue bool) (bool, error)
- func AskForInt(messageToPrint string) (int64, error)
- func AskForIntFromReader(messageToPrint string, inputReader io.Reader) (int64, error)
- func AskForIntFromReaderWithDefault(messageToPrint string, defaultValue int, inputReader io.Reader) (int64, error)
- func AskForIntWithDeafult(messageToPrint string, defaultValue int) (int64, error)
- func AskForOptionalInput(defaultValue string, optional bool) (string, error)
- func AskForPath(messageToPrint string) (string, error)
- func AskForPathFromReader(messageToPrint string, inputReader io.Reader) (string, error)
- func AskForPathFromReaderWithDefault(messageToPrint, defaultValue string, inputReader io.Reader) (string, error)
- func AskForPathWithDefault(messageToPrint, defaultValue string) (string, error)
- func AskForString(messageToPrint string) (string, error)
- func AskForStringFromReader(messageToPrint string, inputReader io.Reader) (string, error)
- func AskForStringFromReaderWithDefault(messageToPrint, defaultValue string, inputReader io.Reader) (string, error)
- func AskForStringWithDefault(messageToPrint, defaultValue string) (string, error)
- func ParseBool(userInputStr string) (bool, error)
- func SelectFromStrings(messageToPrint string, options []string) (string, error)
- func SelectFromStringsFromReader(messageToPrint string, options []string, inputReader io.Reader) (string, error)
- func SelectFromStringsFromReaderWithDefault(messageToPrint string, defaultValue int, options []string, ...) (string, error)
- func SelectFromStringsWithDefault(messageToPrint string, defaultValue int, options []string) (string, error)
- func WriteToTerminalInputBuffer(text string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForBoolFromReader ¶
AskForBoolFromReader ...
func AskForBoolFromReaderWithDefaultValue ¶
func AskForBoolFromReaderWithDefaultValue(messageToPrint string, defaultValue bool, inputReader io.Reader) (bool, error)
AskForBoolFromReaderWithDefaultValue ...
func AskForBoolWithDefault ¶
AskForBoolWithDefault ...
func AskForIntFromReader ¶
AskForIntFromReader ...
func AskForIntFromReaderWithDefault ¶
func AskForIntFromReaderWithDefault(messageToPrint string, defaultValue int, inputReader io.Reader) (int64, error)
AskForIntFromReaderWithDefault ...
func AskForIntWithDeafult ¶
AskForIntWithDeafult ...
func AskForOptionalInput ¶
AskForOptionalInput will wait for input, and will print clearable default text in case of interactive shell. Accepts empty input in case if optional.
func AskForPathFromReader ¶
AskForPathFromReader ...
func AskForPathFromReaderWithDefault ¶
func AskForPathFromReaderWithDefault(messageToPrint, defaultValue string, inputReader io.Reader) (string, error)
AskForPathFromReaderWithDefault asks for a path. The difference between this
and the generic "AskForString..." functions is that this'll clean up the input. For example, if the user drag-and-drops a file/dir for the input then the input might include back-slash escapes for spaces in the path - these will be removed, so the returned path will be "path/with space" instead of "path/with\ space".
func AskForPathWithDefault ¶
AskForPathWithDefault ...
func AskForStringFromReader ¶
AskForStringFromReader ...
func AskForStringFromReaderWithDefault ¶
func AskForStringFromReaderWithDefault(messageToPrint, defaultValue string, inputReader io.Reader) (string, error)
AskForStringFromReaderWithDefault ...
func AskForStringWithDefault ¶
AskForStringWithDefault ...
func SelectFromStrings ¶
SelectFromStrings ...
func SelectFromStringsFromReader ¶
func SelectFromStringsFromReader(messageToPrint string, options []string, inputReader io.Reader) (string, error)
SelectFromStringsFromReader ...
func SelectFromStringsFromReaderWithDefault ¶
func SelectFromStringsFromReaderWithDefault(messageToPrint string, defaultValue int, options []string, inputReader io.Reader) (string, error)
SelectFromStringsFromReaderWithDefault ...
func SelectFromStringsWithDefault ¶
func SelectFromStringsWithDefault(messageToPrint string, defaultValue int, options []string) (string, error)
SelectFromStringsWithDefault ...
func WriteToTerminalInputBuffer ¶
WriteToTerminalInputBuffer prints a text to the terminal console which can be used as an input for a question or can be cleared out
Types ¶
This section is empty.