This commit is contained in:
2026-02-22 14:31:06 +08:00
parent d88178458d
commit f8f647c12a
13 changed files with 518 additions and 529 deletions

View File

@@ -16,25 +16,25 @@ func init() {
}
// record INFO message. Color White
func Info(format string, a ...interface{}) {
func Info(format string, a ...any) {
message := fmt.Sprintf("\033[37m[Info] "+format+"\033[0m\n", a...)
logger.Print(message)
}
// record Warn message. Color Orange
func Warn(format string, a ...interface{}) {
func Warn(format string, a ...any) {
message := fmt.Sprintf("\033[33m[Warn] "+format+"\033[0m\n", a...)
logger.Print(message)
}
// record Success message. Color Green
func Success(format string, a ...interface{}) {
func Success(format string, a ...any) {
message := fmt.Sprintf("\033[32m[Succ] "+format+"\033[0m\n", a...)
logger.Print(message)
}
// record ERROR message. Color Red
func Error(format string, a ...interface{}) {
func Error(format string, a ...any) {
message := fmt.Sprintf("\033[31m[Error] "+format+"\033[0m\n", a...)
logger.Print(message)
}