31 lines
709 B
Go
31 lines
709 B
Go
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)
|
|
}
|