MCPcopy
hub / github.com/pterm/pterm / Stop

Method Stop

spinner_printer.go:183–198  ·  view source on GitHub ↗

Stop terminates the SpinnerPrinter immediately. The SpinnerPrinter will not resolve into anything.

()

Source from the content-addressed store, hash-verified

181// Stop terminates the SpinnerPrinter immediately.
182// The SpinnerPrinter will not resolve into anything.
183func (s *SpinnerPrinter) Stop() error {
184 if !s.IsActive {
185 return nil
186 }
187 s.IsActive = false
188 if RawOutput {
189 return nil
190 }
191 if s.RemoveWhenDone {
192 fClearLine(s.Writer)
193 Fprinto(s.Writer)
194 } else {
195 Fprintln(s.Writer)
196 }
197 return nil
198}
199
200// GenericStart runs Start, but returns a LivePrinter.
201// This is used for the interface LivePrinter.

Callers 6

GenericStopMethod · 0.95
InfoMethod · 0.95
SuccessMethod · 0.95
FailMethod · 0.95
WarningMethod · 0.95

Calls 3

fClearLineFunction · 0.85
FprintoFunction · 0.85
FprintlnFunction · 0.85

Tested by 1