Skip to content

Commit

Permalink
Merge pull request #7 from alanEG/revert-5-alanEG-patch-4
Browse files Browse the repository at this point in the history
Revert "Update logger.go"
  • Loading branch information
alanEG authored Aug 27, 2022
2 parents ccdec8f + bf60dbf commit f5b38d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ func logger(typeLog, Flag, message, reason interface{}, errorRange int) {
case "success":
fmt.Fprintf(os.Stderr, "%s %s\n", yellow(Flag), message)
case "error":
if reason != nil {
if reason != "" {
fmt.Fprintf(os.Stderr, "%s %s\n", red("[Error]"), message)
fmt.Fprintf(os.Stderr, "Reason: %s\n", reason)
} else {
fmt.Fprintf(os.Stderr, "%s %s\n", red("[Error]"), message)
}
if errorRange == 1 {
os.Exit(0)
if errorRange == 1 {
os.Exit(0)
}
}
}
}

0 comments on commit f5b38d0

Please sign in to comment.