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

Method Stop

progressbar_printer.go:310–327  ·  view source on GitHub ↗

Stop the ProgressbarPrinter.

()

Source from the content-addressed store, hash-verified

308
309// Stop the ProgressbarPrinter.
310func (p *ProgressbarPrinter) Stop() (*ProgressbarPrinter, error) {
311 if p.rerenderTask != nil && p.rerenderTask.IsActive() {
312 p.rerenderTask.Stop()
313 }
314 cursor.Show()
315
316 if !p.IsActive {
317 return p, nil
318 }
319 p.IsActive = false
320 if p.RemoveWhenDone {
321 fClearLine(p.Writer)
322 Fprinto(p.Writer)
323 } else {
324 Fprintln(p.Writer)
325 }
326 return p, nil
327}
328
329// GenericStart runs Start, but returns a LivePrinter.
330// This is used for the interface LivePrinter.

Callers 2

AddMethod · 0.95
GenericStopMethod · 0.95

Calls 4

fClearLineFunction · 0.85
FprintoFunction · 0.85
FprintlnFunction · 0.85
ShowMethod · 0.45

Tested by

no test coverage detected