Progress is a progress displaying entity, it allows progress bars & simple prints
| 131 | |
| 132 | // Progress is a progress displaying entity, it allows progress bars & simple prints |
| 133 | type Progress interface { |
| 134 | // Writer interface to support progress bar ticking |
| 135 | io.Writer |
| 136 | // Start makes progress start its work |
| 137 | Start() |
| 138 | // Shutdown shuts down progress display |
| 139 | Shutdown() |
| 140 | // Flush returns when all queued messages are sent |
| 141 | Flush() |
| 142 | // InitBar starts progressbar for count bytes or count items |
| 143 | InitBar(count int64, isBytes bool, barType BarType) |
| 144 | // ShutdownBar stops progress bar and hides it |
| 145 | ShutdownBar() |
| 146 | // AddBar increments progress for progress bar |
| 147 | AddBar(count int) |
| 148 | // SetBar sets current position for progress bar |
| 149 | SetBar(count int) |
| 150 | // Printf does printf but in safe manner: not overwriting progress bar |
| 151 | Printf(msg string, a ...interface{}) |
| 152 | // ColoredPrintf does printf in colored way + newline |
| 153 | ColoredPrintf(msg string, a ...interface{}) |
| 154 | // PrintfStdErr does printf but in safe manner to stderr |
| 155 | PrintfStdErr(msg string, a ...interface{}) |
| 156 | } |
| 157 | |
| 158 | // Downloader is parallel HTTP fetcher |
| 159 | type Downloader interface { |