Codebase list golang-github-vbauerster-mpb / a66cae3
example_test update 2 Vladimir Bauer 9 years ago
2 changed file(s) with 4 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
3636 // Star mpb's rendering goroutine.
3737 p := mpb.New()
3838 // Set custom width for every bar, which mpb will render
39 // The default one in 70
40 p.SetWidth(80)
39 // The default one in 80
40 p.SetWidth(100)
4141 // Set custom format for every bar, the default one is "[=>-]"
4242 p.Format("╢▌▌░╟")
4343 // Set custom refresh rate, the default one is 100 ms
1111
1212 func Example() {
1313 // Star mpb's rendering goroutine.
14 // If you don't plan to cancel, feed with nil
15 // otherwise provide context.Context, see cancel example
1614 p := mpb.New()
1715 // Set custom width for every bar, which mpb will contain
18 // The default one in 70
19 p.SetWidth(80)
16 // The default one in 80
17 p.SetWidth(100)
2018 // Set custom format for every bar, the default one is "[=>-]"
2119 p.Format("╢▌▌░╟")
2220 // Set custom refresh rate, the default one is 100 ms