MCPcopy Create free account
hub / github.com/schollz/progressbar / ExampleProgressBar_Finish

Function ExampleProgressBar_Finish

progressbar_test.go:117–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115}
116
117func ExampleProgressBar_Finish() {
118 bar := NewOptions(100, OptionSetWidth(10), OptionShowCount(), OptionShowBytes(true), OptionShowIts())
119 bar.Reset()
120 time.Sleep(1 * time.Second)
121 bar.Finish()
122 // Output:
123 // 100% |██████████| (100/100 B, 100 B/s, 100 it/s)
124}
125
126func TestSpinnerFinish(t *testing.T) {
127 buf := strings.Builder{}

Callers

nothing calls this directly

Calls 7

NewOptionsFunction · 0.85
OptionSetWidthFunction · 0.85
OptionShowCountFunction · 0.85
OptionShowBytesFunction · 0.85
OptionShowItsFunction · 0.85
ResetMethod · 0.80
FinishMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…