Chalk-advanced-go is a library that allows you to colorize your console output in go.
Install chalk-advanced-go
go get github.com/marchoffmann07/chalk-advanced-go@v1.3.3package main
import (
"fmt"
ChalkAdvanced "github.com/marchoffmann07/chalk-advanced-go"
)
func main() {
fmt.Println(ChalkAdvanced.Blue("Blue message"))
}Black(text)Red(text)Green(text)Yellow(text)Blue(text)Magenta(text)Cyan(text)White(text)Gray(text)
RedBright(text)GreenBright(text)YellowBright(text)BlueBright(text)MagentaBright(text)CyanBright(text)WhiteBright(text)
BgBlack(text)BgRed(text)BgGreen(text)BgYellow(text)BgBlue(text)BgMagenta(text)BgCyan(text)BgWhite(text)
BgRedBright(text)BgGreenBright(text)BgYellowBright(text)BgBlueBright(text)BgMagentaBright(text)BgCyanBright(text)BgWhiteBright(text)
Bold(text)Dim(text)Italic(text)Underline(text)Inverse(text)Hide(text)Strikethrough(text)