Codebase list golang-github-vbauerster-mpb / b405bfd
Expose Filler's Fill method Vladimir Bauer 7 years ago
3 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
3333 }
3434
3535 type Filler interface {
36 fill(w io.Writer, width int, s *decor.Statistics)
36 Fill(w io.Writer, width int, s *decor.Statistics)
3737 }
3838
3939 type (
348348 }
349349
350350 if prependCount+s.width+appendCount > termWidth {
351 s.filler.fill(s.bufB, termWidth-prependCount-appendCount, stat)
351 s.filler.Fill(s.bufB, termWidth-prependCount-appendCount, stat)
352352 } else {
353 s.filler.fill(s.bufB, s.width, stat)
353 s.filler.Fill(s.bufB, s.width, stat)
354354 }
355355
356356 if !s.trimSpace {
2222 refill *refill
2323 }
2424
25 func (s *barFiller) fill(w io.Writer, width int, stat *decor.Statistics) {
25 func (s *barFiller) Fill(w io.Writer, width int, stat *decor.Statistics) {
2626
2727 str := string(s.format[rLeft])
2828
2222 alignment SpinnerAlignment
2323 }
2424
25 func (s *spinnerFiller) fill(w io.Writer, width int, stat *decor.Statistics) {
25 func (s *spinnerFiller) Fill(w io.Writer, width int, stat *decor.Statistics) {
2626
2727 frame := s.frames[stat.Current%int64(len(s.frames))]
2828 frameWidth := utf8.RuneCountInString(frame)