engine/print/print.go

31 lines
709 B
Go
Raw Permalink Normal View History

2024-02-11 01:31:01 +08:00
package print
import (
"fmt"
"log"
)
// record INFO message. Color White
func Info(format string, a ...interface{}) {
message := fmt.Sprintf("\033[37m"+format+"\033[0m\n", a...)
log.Print(message)
}
// record ERROR message. Color Red
func Important(format string, a ...interface{}) {
message := fmt.Sprintf("\033[33m"+format+"\033[0m\n", a...)
log.Print(message)
}
// record Success message. Color Green
func Success(format string, a ...interface{}) {
message := fmt.Sprintf("\033[32m"+format+"\033[0m\n", a...)
log.Print(message)
}
// record ERROR message. Color Red
func Fail(format string, a ...interface{}) {
message := fmt.Sprintf("\033[31m"+format+"\033[0m\n", a...)
log.Print(message)
}