Documentation ¶
Overview ¶
-- @Time : 2021/3/8 15:30 -- @Author : raoxiaoya -- @Desc :
Index ¶
Constants ¶
View Source
const ( FrontBlack = iota + 30 FrontRed FrontGreen FrontYellow FrontBlue FrontPurple FrontCyan FrontWhite )
View Source
const ( BackBlack = iota + 40 BackRed BackGreen BackYellow BackBlue BackPurple BackCyan BackWhite )
View Source
const ( ModeDefault = 0 ModeHighLight = 1 ModeLine = 4 ModeFlash = 5 ModeReWhite = 6 ModeHidden = 7 )
View Source
const ( CmdBlack = 0 CmdRed = 4 CmdGreen = 2 CmdYellow = 6 CmdBlue = 1 CmdPurple = 5 CmdCyan = 3 CmdWhite = 7 )
Variables ¶
View Source
var CmdPrint func(s interface{}, i int)
Functions ¶
This section is empty.
Types ¶
type ColorOutput ¶
type ColorOutput struct {
// contains filtered or unexported fields
}
var Colorful ColorOutput
func (ColorOutput) Println ¶
func (c ColorOutput) Println(str interface{})
其中0x1B是标记,[开始定义颜色,依次为:模式,背景色,前景色,0代表恢复默认颜色。
func (ColorOutput) WithBackColor ¶
func (c ColorOutput) WithBackColor(color string) ColorOutput
func (ColorOutput) WithFrontColor ¶
func (c ColorOutput) WithFrontColor(color string) ColorOutput
func (ColorOutput) WithMode ¶
func (c ColorOutput) WithMode(mode int) ColorOutput
Click to show internal directories.
Click to hide internal directories.