messages rewritten

This commit is contained in:
alessio 2016-08-20 16:15:05 +02:00
parent 739ec5c9b5
commit 9b8acac909

View File

@ -44,23 +44,38 @@ func Init() *App {
} }
// Fail is a red message, generally used for errors // Fail is a red message, generally used for errors
func Fail(msg string) { func Fail(msg ...interface{}) {
fmt.Println(red(msg)) color.Set(color.FgRed, color.Bold)
fmt.Println(msg...)
color.Unset()
} }
// Success is a green message, generally used for feedback // Success is a green message, generally used for feedback
func Success(msg string) { func Success(msg ...interface{}) {
fmt.Println(green(msg)) color.Set(color.FgGreen, color.Bold)
fmt.Println(msg...)
color.Unset()
} }
// LogSuccess is a green log message, generally used for feedback // LogSuccess is a green log message, generally used for feedback
func LogSuccess(msg string) { func LogSuccess(msg ...interface{}) {
log.Println(green(msg)) color.Set(color.FgGreen, color.Bold)
log.Println(msg...)
color.Unset()
} }
// LogFail is a red log message, generally used for errors // LogFail is a red log message, generally used for errors
func LogFail(msg string) { func LogFail(msg ...interface{}) {
log.Println(red(msg)) color.Set(color.FgRed, color.Bold)
log.Println(msg...)
color.Unset()
}
// LogWatch is a blue log message used only for watcher outputs
func LogWatch(msg ...interface{}) {
color.Set(color.FgBlue, color.Bold)
log.Println(msg...)
color.Unset()
} }
// Information print realize name and description // Information print realize name and description