MCPcopy Index your code
hub / github.com/pterm/pterm / Warning

Method Warning

spinner_printer.go:271–284  ·  view source on GitHub ↗

Warning displays the warning printer. If no message is given, the text of the SpinnerPrinter will be reused as the default message.

(message ...any)

Source from the content-addressed store, hash-verified

269// Warning displays the warning printer.
270// If no message is given, the text of the SpinnerPrinter will be reused as the default message.
271func (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}

Callers 5

mainFunction · 0.80
mainFunction · 0.80

Calls 4

StopMethod · 0.95
fClearLineFunction · 0.85
FprintoFunction · 0.85
SprintMethod · 0.65

Tested by 3