Skip to content

Commit

Permalink
Fix redefines-builtin-id
Browse files Browse the repository at this point in the history
  • Loading branch information
strideynet committed Feb 2, 2024
1 parent 5723702 commit 7cc0d7d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions internal/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,54 @@ import (
)

var (
info = color.Magenta("ℹ")
success = color.Green("✔")
warning = color.Yellow("⚠")
error = color.Red("✖")
infoColor = color.Magenta("ℹ")
successColor = color.Green("✔")
warningColor = color.Yellow("⚠")
errorColor = color.Red("✖")
)

func Info(message any) {
fmt.Printf("%s %s\n", info, message)
fmt.Printf("%s %s\n", infoColor, message)
}

func Infof(format string, a ...any) {
fmt.Printf("%s ", info)
fmt.Printf("%s ", infoColor)
fmt.Printf(format, a...)
fmt.Print("\n")
}

func Success(message any) {
fmt.Printf("%s %s\n", success, message)
fmt.Printf("%s %s\n", successColor, message)
}

func Successf(format string, a ...any) {
fmt.Printf("%s ", success)
fmt.Printf("%s ", successColor)
fmt.Printf(format, a...)
fmt.Print("\n")
}

func Warning(message any) {
fmt.Printf("%s %s\n", warning, message)
fmt.Printf("%s %s\n", warningColor, message)
}

func Warningf(format string, a ...any) {
fmt.Printf("%s ", warning)
fmt.Printf("%s ", warningColor)
fmt.Printf(format, a...)
fmt.Print("\n")
}

func Error(message any) {
fmt.Printf("%s %s\n", error, message)
fmt.Printf("%s %s\n", errorColor, message)
}

func Errorf(format string, a ...any) {
fmt.Printf("%s ", error)
fmt.Printf("%s ", errorColor)
fmt.Printf(format, a...)
fmt.Print("\n")
}

func Fatal(message any) {
fmt.Printf("%s %s\n", error, message)
fmt.Printf("%s %s\n", errorColor, message)
os.Exit(1)
}

Expand Down

0 comments on commit 7cc0d7d

Please sign in to comment.