Failed will print a red error message and exit with failure.
(format string, a ...any)
| 66 | |
| 67 | // Failed will print a red error message and exit with failure. |
| 68 | func Failed(format string, a ...any) { |
| 69 | format = ColorizeText(format, "red") |
| 70 | if a != nil { |
| 71 | // output.UserOut.Fatalf(format, a...) |
| 72 | output.UserErr.Fatalf(format, a...) |
| 73 | // output.UserOut.WithField("level", "fatal").Fatalf(format, a...) |
| 74 | } else { |
| 75 | output.UserErr.Fatal(format) |
| 76 | // output.UserOut.WithField("level", "fatal").Fatal(format) |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // Error will print a red error message but will not exit. |
| 81 | func Error(format string, a ...any) { |