Warning displays the warning printer. If no message is given, the text of the SpinnerPrinter will be reused as the default message.
(message ...any)
| 269 | // Warning displays the warning printer. |
| 270 | // If no message is given, the text of the SpinnerPrinter will be reused as the default message. |
| 271 | func (s *SpinnerPrinter) Warning(message ...any) { |
| 272 | if s.WarningPrinter == nil { |
| 273 | s.WarningPrinter = &Warning |
| 274 | } |
| 275 | |
| 276 | if len(message) == 0 { |
| 277 | message = []any{s.Text} |
| 278 | } |
| 279 | |
| 280 | fClearLine(s.Writer) |
| 281 | |
| 282 | Fprinto(s.Writer, s.WarningPrinter.Sprint(message...)) |
| 283 | _ = s.Stop() |
| 284 | } |