mirror of
https://github.com/beego/bee.git
synced 2024-11-22 05:00:54 +00:00
Added black and white colors
This commit is contained in:
parent
1dc55894c9
commit
621dbf2ed9
20
color.go
20
color.go
@ -57,6 +57,16 @@ func bold(message string) string {
|
||||
return fmt.Sprintf("\x1b[1m%s\x1b[21m", message)
|
||||
}
|
||||
|
||||
// Black returns a black string
|
||||
func Black(message string) string {
|
||||
return fmt.Sprintf("\x1b[30m%s\x1b[0m", message)
|
||||
}
|
||||
|
||||
// White returns a white string
|
||||
func White(message string) string {
|
||||
return fmt.Sprintf("\x1b[37m%s\x1b[0m", message)
|
||||
}
|
||||
|
||||
// Cyan returns a cyan string
|
||||
func Cyan(message string) string {
|
||||
return fmt.Sprintf("\x1b[36m%s\x1b[0m", message)
|
||||
@ -92,6 +102,16 @@ func Magenta(message string) string {
|
||||
return fmt.Sprintf("\x1b[35m%s\x1b[0m", message)
|
||||
}
|
||||
|
||||
// BlackBold returns a black bold string
|
||||
func BlackBold(message string) string {
|
||||
return fmt.Sprintf("\x1b[30m%s\x1b[0m", bold(message))
|
||||
}
|
||||
|
||||
// WhiteBold returns a white bold string
|
||||
func WhiteBold(message string) string {
|
||||
return fmt.Sprintf("\x1b[37m%s\x1b[0m", bold(message))
|
||||
}
|
||||
|
||||
// CyanBold returns a cyan bold string
|
||||
func CyanBold(message string) string {
|
||||
return fmt.Sprintf("\x1b[36m%s\x1b[0m", bold(message))
|
||||
|
Loading…
Reference in New Issue
Block a user