WarningOnce will present the user with warning text only once per message.
(format string, a ...any)
| 99 | |
| 100 | // WarningOnce will present the user with warning text only once per message. |
| 101 | func WarningOnce(format string, a ...any) { |
| 102 | defer TimeTrackC("WarningOnce(): " + fmt.Sprintf(format, a...))() |
| 103 | outputOnce(format, a, Warning) |
| 104 | } |
| 105 | |
| 106 | // WarningWithColor allows specifying a color for the warning to make it more visible |
| 107 | func WarningWithColor(color string, format string, a ...any) { |