Codebase list golang-github-vbauerster-mpb / 4ebfac4
singleBar example: Inclusive Vladimir Bauer 4 years ago
2 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
3636
3737 total := 100
3838 name := "Single Bar:"
39 style := mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟").Inclusive(0)
3940 // adding a single bar, which will inherit container's width
4041 bar := p.Add(int64(total),
4142 // progress bar filler with customized style
42 mpb.NewBarFiller(mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟")),
43 mpb.NewBarFiller(style),
4344 mpb.PrependDecorators(
4445 // display our name with one space on the right
4546 decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}),
1313
1414 total := 100
1515 name := "Single Bar:"
16 style := mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟").Inclusive(0)
1617 // adding a single bar, which will inherit container's width
1718 bar := p.Add(int64(total),
1819 // progress bar filler with customized style
19 mpb.NewBarFiller(mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟")),
20 mpb.NewBarFiller(style),
2021 mpb.PrependDecorators(
2122 // display our name with one space on the right
2223 decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}),