Documentation
¶
Index ¶
- Variables
- func ErrorString(str string) string
- func InfoString(str string) string
- func Println(str string, color Color)
- func PrintlnError(str string)
- func PrintlnInfo(str string)
- func PrintlnWarn(str string)
- func String(str string, color Color) string
- func WarnString(str string) string
- type BackgroundColor
- type Color
- type ForegroundColor
- type Mode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 前景色 Black = ForegroundColor(30) Red = ForegroundColor(31) Green = ForegroundColor(32) Yellow = ForegroundColor(33) Blue = ForegroundColor(34) Purple = ForegroundColor(35) DarkGreen = ForegroundColor(36) White = ForegroundColor(37) // 背景色 BlackBGColor = BackgroundColor(40) RedBGColor = BackgroundColor(41) GreenBGColor = BackgroundColor(42) YellowBGColor = BackgroundColor(43) BlueBGColor = BackgroundColor(44) PurpleBGColor = BackgroundColor(45) DarkGreenBGColor = BackgroundColor(46) WhiteBGColor = BackgroundColor(47) // 0:默认模式,无特殊效果 DEFAULT = Mode(0) // 1:粗体模式 BOLD = Mode(1) // 2:淡化模式 FAINT = Mode(2) // 3:斜体模式 ITALIC = Mode(3) // 4:下划线模式 UNDERLINE = Mode(4) // 5:闪烁模式 BLINK = Mode(5) // 7:反显模式 REVERSE = Mode(6) // 8:隐藏模式 HIDDEN = Mode(7) )
Functions ¶
func ErrorString ¶
func InfoString ¶
func PrintlnError ¶
func PrintlnError(str string)
func PrintlnInfo ¶
func PrintlnInfo(str string)
func PrintlnWarn ¶
func PrintlnWarn(str string)
func WarnString ¶
Types ¶
type BackgroundColor ¶
type BackgroundColor int
type Color ¶
type Color struct { ForegroundColor ForegroundColor BackgroundColor BackgroundColor Mode Mode }
type ForegroundColor ¶
type ForegroundColor int
Click to show internal directories.
Click to hide internal directories.