Codebase list golang-github-vbauerster-mpb / 7347c6c
fix golint warning Vladimir Bauer 5 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
114114
115115 func (s *barFiller) Fill(w io.Writer, reqWidth int, stat decor.Statistics) {
116116 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
117123
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 }
124124 w.Write(s.format[rLeft])
125125 defer w.Write(s.format[rRight])
126126