courgette/internal/logging/colors.go

18 lines
351 B
Go
Raw Normal View History

2024-08-03 17:10:01 +00:00
// Color utilities to enhance text printed to the screen.
//
// See: https://en.wikipedia.org/wiki/ANSI_escape_code
package logging
func Bold(text string) string {
return "\033[1m" + text + "\033[0m"
}
func Green(text string) string {
return "\033[32m" + text + "\033[0m"
}
func Red(text string) string {
return "\033[31m" + text + "\033[0m"
}