bar filler: no need for named return error
Vladimir Bauer
2 years ago
| 188 | 188 | return bf |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | func (s *bFiller) Fill(w io.Writer, stat decor.Statistics) (err error) { | |
| 191 | func (s *bFiller) Fill(w io.Writer, stat decor.Statistics) error { | |
| 192 | 192 | width := internal.CheckRequestedWidth(stat.RequestedWidth, stat.AvailableWidth) |
| 193 | 193 | // don't count brackets as progress |
| 194 | 194 | width -= (s.components[iLbound].width + s.components[iRbound].width) |
| 196 | 196 | return nil |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | err = s.meta[iLbound](w, s.components[iLbound].bytes) | |
| 199 | err := s.meta[iLbound](w, s.components[iLbound].bytes) | |
| 200 | 200 | if err != nil { |
| 201 | 201 | return err |
| 202 | 202 | } |