refactoring: termWidth to width
Vladimir Bauer
7 years ago
| 18 | 18 | // any bar kind, by implementing this interface and passing it to the |
| 19 | 19 | // Add method. |
| 20 | 20 | type Filler interface { |
| 21 | Fill(w io.Writer, termWidth int, stat *decor.Statistics) | |
| 21 | Fill(w io.Writer, width int, stat *decor.Statistics) | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | // FillerFunc is function type adapter to convert function into Filler. |
| 25 | type FillerFunc func(w io.Writer, termWidth int, stat *decor.Statistics) | |
| 26 | ||
| 27 | func (f FillerFunc) Fill(w io.Writer, termWidth int, stat *decor.Statistics) { | |
| 28 | f(w, termWidth, stat) | |
| 25 | type FillerFunc func(w io.Writer, width int, stat *decor.Statistics) | |
| 26 | ||
| 27 | func (f FillerFunc) Fill(w io.Writer, width int, stat *decor.Statistics) { | |
| 28 | f(w, width, stat) | |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | // Bar represents a progress Bar. |