Documentation ¶
Index ¶
- func AskForConfirmation(def bool) bool
- func Blank()
- func Error(msg string)
- func Errorf(msg string, args ...interface{})
- func Failure(msg string)
- func Failuref(msg string, args ...interface{})
- func Fatal(msg string)
- func Fatalf(msg string, args ...interface{})
- func Info(msg string)
- func Infof(msg string, args ...interface{})
- func Success(msg string)
- func Successf(msg string, args ...interface{})
- func Warn(msg string)
- func Warnf(msg string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForConfirmation ¶
AskForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user. Typically, you should use fmt to print out a question before calling askForConfirmation. E.g. fmt.Println("WARNING: Are you sure? (yes/no)")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.