Documentation ¶
Overview ¶
Package print defines functions to accept colored standard output and user input
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Stdout is new instance of Writer which handles escape sequence for stdout. Stdout = colorable.NewColorableStdout() // Stderr is new instance of Writer which handles escape sequence for stderr. Stderr = colorable.NewColorableStderr() )
View Source
var FmtScanln = fmt.Scanln
FmtScanln is wrapper for fmt.Scanln(). It's for unit test.
View Source
var OsExit = os.Exit
OsExit is wrapper for os.Exit(). It's for unit test.
Functions ¶
func Err ¶
func Err(err interface{})
Err print error message at STDERR in yellow. This function is used to print error message to the user.
func Fatal ¶
func Fatal(err interface{})
Fatal print dying message at STDERR in red. After print message, process will exit
func Info ¶
func Info(msg string)
Info print information message at STDOUT in green. This function is used to print some information (that is not error) to the user.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.