MCPcopy
hub / github.com/abiosoft/ishell / ProgressBar

Interface ProgressBar

progress.go:23–47  ·  view source on GitHub ↗

ProgressBar is an ishell progress bar.

Source from the content-addressed store, hash-verified

21
22// ProgressBar is an ishell progress bar.
23type 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
49const progressInterval = time.Millisecond * 100
50

Callers 10

copyShellProgressBarFunction · 0.65
copyShellProgressBarFunction · 0.65
mainFunction · 0.65
copyShellProgressBarFunction · 0.65
mainFunction · 0.65
copyShellProgressBarFunction · 0.65
copyShellProgressBarFunction · 0.65
mainFunction · 0.65
copyShellProgressBarFunction · 0.65
mainFunction · 0.65

Implementers 1

progressBarImplprogress.go

Calls

no outgoing calls

Tested by

no test coverage detected