ProgressBar is an ishell progress bar.
| 21 | |
| 22 | // ProgressBar is an ishell progress bar. |
| 23 | type ProgressBar interface { |
| 24 | // Display sets the display of the progress bar. |
| 25 | Display(ProgressDisplay) |
| 26 | // Indeterminate sets the progress bar type |
| 27 | // to indeterminate if true or determinate otherwise. |
| 28 | Indeterminate(bool) |
| 29 | // Interval sets the time between transitions for indeterminate |
| 30 | // progress bar. |
| 31 | Interval(time.Duration) |
| 32 | // SetProgress sets the progress stage of the progress bar. |
| 33 | // percent is from between 1 and 100. |
| 34 | Progress(percent int) |
| 35 | // Prefix sets the prefix for the output. The text to place before |
| 36 | // the display. |
| 37 | Prefix(string) |
| 38 | // Suffix sets the suffix for the output. The text to place after |
| 39 | // the display. |
| 40 | Suffix(string) |
| 41 | // Final sets the string to show after the progress bar is done. |
| 42 | Final(string) |
| 43 | // Start starts the progress bar. |
| 44 | Start() |
| 45 | // Stop stops the progress bar. |
| 46 | Stop() |
| 47 | } |
| 48 | |
| 49 | const progressInterval = time.Millisecond * 100 |
| 50 |
no outgoing calls
no test coverage detected