Documentation
¶
Index ¶
- Variables
- func CreateBgColor() string
- func CreateBgColorCode() string
- func CreateColor() string
- func CreateColorCode() string
- func GetCodeBg(code string) string
- func GetDefaultBg() string
- func GetGreyBg() string
- func GetReset() string
- func GetWhiteBg() string
- func LabelPrint(message string, attribute int) string
- func LabelPrintWithArg(message string, fg string, bg string, attribute int) string
- func PadString(line string, max int) string
- func PadStringToR(line string, max int) string
- func PrintColored(code string, outputs string) string
- func PrintColoredBg(code string, bgCode string, outputs string) string
- func ResetColors(print bool) string
- type LabelColor
Constants ¶
This section is empty.
Variables ¶
var CurrentBgColor = "40"
CurrentBgColor current used background color
var CurrentColor = "36"
CurrentColor current used foreground color
Functions ¶
func CreateBgColor ¶
func CreateBgColor() string
CreateBgColor defines a random color and returns a id
func CreateBgColorCode ¶
func CreateBgColorCode() string
CreateBgColorCode returns the colorcode by a random number
func CreateColorCode ¶
func CreateColorCode() string
CreateColorCode returns the colorcode by a random number
func LabelPrint ¶
LabelPrint prints message by using current fore and background
func LabelPrintWithArg ¶
LabelPrintWithArg prints message by using current fore and background
func PadStringToR ¶
PadStringToR Returns max len string filled with spaces right placed
func PrintColored ¶
PrintColored formats string colored by the color id
func PrintColoredBg ¶
PrintColoredBg formats string colored by the color id including background
func ResetColors ¶
ResetColors resets terminal colors if print false you get the ansi code only
Types ¶
type LabelColor ¶
LabelColor contains fore and background color