fix golint warning
Vladimir Bauer
5 years ago
| 114 | 114 | |
| 115 | 115 | func (s *barFiller) Fill(w io.Writer, reqWidth int, stat decor.Statistics) { |
| 116 | 116 | width := internal.WidthForBarFiller(reqWidth, stat.AvailableWidth) |
| 117 | brackets := s.rwidth[rLeft] + s.rwidth[rRight] | |
| 118 | if width < brackets { | |
| 119 | return | |
| 120 | } | |
| 121 | // don't count brackets as progress | |
| 122 | width -= brackets | |
| 117 | 123 | |
| 118 | if brackets := s.rwidth[rLeft] + s.rwidth[rRight]; width < brackets { | |
| 119 | return | |
| 120 | } else { | |
| 121 | // don't count brackets as progress | |
| 122 | width -= brackets | |
| 123 | } | |
| 124 | 124 | w.Write(s.format[rLeft]) |
| 125 | 125 | defer w.Write(s.format[rRight]) |
| 126 | 126 |