refactoring: prefer len(bb)
Vladimir Bauer
7 years ago
| 46 | 46 | |
| 47 | 47 | func (s *barFiller) setReverse() { |
| 48 | 48 | s.reverse = true |
| 49 | } | |
| 50 | ||
| 51 | func (s *barFiller) SetRefill(count int) { | |
| 52 | s.refillCount = count | |
| 49 | 53 | } |
| 50 | 54 | |
| 51 | 55 | func (s *barFiller) Fill(w io.Writer, width int, stat *decor.Statistics) { |
| 100 | 104 | } |
| 101 | 105 | } |
| 102 | 106 | |
| 103 | for i := 0; i < width; i++ { | |
| 107 | for i := 0; i < len(bb); i++ { | |
| 104 | 108 | w.Write(bb[i]) |
| 105 | 109 | } |
| 106 | 110 | w.Write(s.format[rRight]) |
| 107 | 111 | } |
| 108 | ||
| 109 | func (s *barFiller) SetRefill(count int) { | |
| 110 | s.refillCount = count | |
| 111 | } | |