Documentation ¶
Index ¶
- Constants
- Variables
- func Color(code, msg string) string
- func Debug(msg string, args ...interface{})
- func ErrMsg(msg string, args ...interface{})
- func Error(msg string, args ...interface{})
- func Info(msg string, args ...interface{})
- func Msg(msg string, args ...interface{})
- func Puts(msg string, args ...interface{})
- func Warn(msg string, args ...interface{})
Constants ¶
View Source
const ( Blue = "0;34" Red = "0;31" Green = "0;32" Yellow = "0;33" Cyan = "0;36" Pink = "1;35" )
These contanstants map to color codes for shell scripts making them human readable.
Variables ¶
View Source
var IsDebugging = false
IsDebugging, if true, shows verbose levels, like Debug.
View Source
var NoColor = false
NoColor, if true, will not use color in the output.
View Source
var Quiet = false
Quiet, if true, suppresses chatty levels, like Info.
View Source
var Stderr = os.Stderr
Stderr is the location where this prints logs.
View Source
var Stdout = os.Stdout
Stdout is the location where this prints output.
Functions ¶
func Color ¶
Color returns a string in a certain color. The first argument is a string containing the color code or a constant from the table above mapped to a code.
The following will print the string "Foo" in yellow:
fmt.Print(Color(Yellow, "Foo"))
func Msg ¶
func Msg(msg string, args ...interface{})
Msg prints a message with optional arguments, that can be printed, of varying types.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.