MCPcopy
hub / github.com/pterm/pterm / GenericStop

Method GenericStop

progressbar_printer.go:341–345  ·  view source on GitHub ↗

GenericStop runs Stop, but returns a LivePrinter. This is used for the interface LivePrinter. You most likely want to use Stop instead of this in your program.

()

Source from the content-addressed store, hash-verified

339// This is used for the interface LivePrinter.
340// You most likely want to use Stop instead of this in your program.
341func (p *ProgressbarPrinter) GenericStop() (*LivePrinter, error) {
342 p2, _ := p.Stop()
343 lp := LivePrinter(p2)
344 return &lp, nil
345}
346
347// GetElapsedTime returns the elapsed time, since the ProgressbarPrinter was started.
348func (p *ProgressbarPrinter) GetElapsedTime() time.Duration {

Callers

nothing calls this directly

Calls 2

StopMethod · 0.95
LivePrinterInterface · 0.85

Tested by

no test coverage detected