goProject/trunk/goutil/debugUtil/display.go
皮蛋13361098506 1b77f62820 初始化项目
2025-01-06 16:01:02 +08:00

48 lines
1.4 KiB
Go

package debugUtil
import "github.com/fatih/color"
// Code 显示代码
type Code = color.Attribute
const (
Code_Reset Code = color.Reset
Code_Bold Code = color.Bold
Code_Faint Code = color.Faint
Code_Italic Code = color.Italic
Code_Underline Code = color.Underline
Code_BlinkSlow Code = color.BlinkSlow
Code_BlinkRapid Code = color.BlinkRapid
Code_ReverseVideo Code = color.ReverseVideo
Code_Concealed Code = color.Concealed
Code_CrossedOut Code = color.CrossedOut
)
// ForegroundColor 前景色
type ForegroundColor = color.Attribute
const (
Foreground_Black ForegroundColor = color.FgBlack
Foreground_Red ForegroundColor = color.FgRed
Foreground_Green ForegroundColor = color.FgGreen
Foreground_Yellow ForegroundColor = color.FgYellow
Foreground_Blue ForegroundColor = color.FgBlue
Foreground_Purple ForegroundColor = color.FgMagenta
Foreground_Cyan ForegroundColor = color.FgCyan
Foreground_White ForegroundColor = color.FgWhite
)
// BackgroundColor 背景色
type BackgroundColor = color.Attribute
const (
BackgroundColor_Black = color.BgBlack
BackgroundColor_Red = color.BgRed
BackgroundColor_Green = color.BgGreen
BackgroundColor_Yellow = color.BgYellow
BackgroundColor_Blue = color.BgBlue
BackgroundColor_Purple = color.BgMagenta
BackgroundColor_Cyan = color.BgCyan
BackgroundColor_White = color.BgWhite
)