MCPcopy
hub / github.com/pterm/pterm / ProgressbarPrinter

Struct ProgressbarPrinter

progressbar_printer.go:40–65  ·  view source on GitHub ↗

ProgressbarPrinter shows a progress animation in the terminal.

Source from the content-addressed store, hash-verified

38
39// ProgressbarPrinter shows a progress animation in the terminal.
40type ProgressbarPrinter struct {
41 Title string
42 Total int
43 Current int
44 BarCharacter string
45 LastCharacter string
46 ElapsedTimeRoundingFactor time.Duration
47 BarFiller string
48 MaxWidth int
49
50 ShowElapsedTime bool
51 ShowCount bool
52 ShowTitle bool
53 ShowPercentage bool
54 RemoveWhenDone bool
55
56 TitleStyle *Style
57 BarStyle *Style
58
59 IsActive bool
60
61 startedAt time.Time
62 rerenderTask *schedule.Task
63
64 Writer io.Writer
65}
66
67// WithTitle sets the name of the ProgressbarPrinter.
68func (p ProgressbarPrinter) WithTitle(name string) *ProgressbarPrinter {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected