pb icon indicating copy to clipboard operation
pb copied to clipboard

How to add break line to Prefix

Open minhkhiemm opened this issue 6 years ago • 0 comments

I want to add the break line between prefix and the progress bar [1/3]Prefix [2/3]#####################################################--------------------------------------------------------------------------------------------21/58

to be like this:

[1/3]Prefix 
[2/3]#####################################################--------------------------------------------------------------------------------------------21/58

my code:

bar.Prefix(fmt.Sprintf("[1/3] Prefix)) // add \n after this won't work
bar.Increment()
bar.BarEnd = fmt.Sprintf(
 "%v/%v",
 bar.Get(),
 len(total),
                  )

Many thanks!!

minhkhiemm avatar Dec 02 '19 06:12 minhkhiemm