Documentation
¶
Index ¶
- Constants
- func AskFor(message string, validValues ...string) (string, error)
- func AskForConfirmation(message string, yesByDefault bool) bool
- func AskForInt(message string) (int, error)
- func ClearAfterCursor()
- func ClearLine()
- func ClearScreen()
- func DownloadFile(fileURL, targetFilePath string) error
- func EditLastLine()
- func Exit()
- func Fmt(format string, v ...interface{}) string
- func FormatTime(rawSeconds int) string
- func GetUserHome() string
- func HandleError(err error, message string)
- func HideCursor()
- func LoadDataFolder() string
- func MoveCursorTo(line, column int)
- func MoveCursorUp(lineCount int)
- func OnSigTerm(callback SigCallback)
- func Pad(n, size int) string
- func PrintWithLoadIcon(message string, c chan bool, stepTime time.Duration, clearScreen bool)
- func ShowCursor()
- func WaitForEnter(message string) error
- type SigCallback
Constants ¶
View Source
const ( ColorBold = "\033[1m" ColorReset = "\033[0m" ColorRed = "\033[31m" ColorGreen = "\033[32m" ColorYellow = "\033[33m" ColorBlue = "\033[34m" ColorWhite = "\033[39m" )
Variables ¶
This section is empty.
Functions ¶
func AskForConfirmation ¶ added in v0.0.2
func ClearAfterCursor ¶
func ClearAfterCursor()
func ClearScreen ¶
func ClearScreen()
func DownloadFile ¶
func EditLastLine ¶
func EditLastLine()
func FormatTime ¶ added in v0.0.2
func GetUserHome ¶ added in v0.0.2
func GetUserHome() string
func HandleError ¶
func HideCursor ¶ added in v0.0.2
func HideCursor()
func LoadDataFolder ¶
func LoadDataFolder() string
func MoveCursorTo ¶
func MoveCursorTo(line, column int)
func MoveCursorUp ¶
func MoveCursorUp(lineCount int)
func OnSigTerm ¶
func OnSigTerm(callback SigCallback)
func PrintWithLoadIcon ¶
func ShowCursor ¶ added in v0.0.2
func ShowCursor()
func WaitForEnter ¶
Types ¶
type SigCallback ¶
Click to show internal directories.
Click to hide internal directories.