ProgressbarPrinter shows a progress animation in the terminal.
| 38 | |
| 39 | // ProgressbarPrinter shows a progress animation in the terminal. |
| 40 | type 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. |
| 68 | func (p ProgressbarPrinter) WithTitle(name string) *ProgressbarPrinter { |
nothing calls this directly
no outgoing calls
no test coverage detected