Refill.Till > Refill.till
Vladimir Bauer
9 years ago
| 47 | 47 | // Refil is a struct for b.IncrWithReFill |
| 48 | 48 | type Refill struct { |
| 49 | 49 | Char rune |
| 50 | Till int64 | |
| 50 | till int64 | |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Eta returns exponential-weighted-moving-average ETA estimator |
| 323 | 323 | s.completed = true |
| 324 | 324 | } |
| 325 | 325 | s.current = n |
| 326 | s.refill = r.refill | |
| 326 | if r.refill != nil { | |
| 327 | r.refill.till = n | |
| 328 | s.refill = r.refill | |
| 329 | } | |
| 327 | 330 | incrStartTime = time.Now() |
| 328 | 331 | case <-b.flushedCh: |
| 329 | 332 | if s.completed { |
| 449 | 452 | buf = append(buf, fmtBytes[rLeft]...) |
| 450 | 453 | |
| 451 | 454 | if rf != nil { |
| 452 | till := percentage(total, rf.Till, barWidth) | |
| 455 | till := percentage(total, rf.till, barWidth) | |
| 453 | 456 | rbytes := make([]byte, utf8.RuneLen(rf.Char)) |
| 454 | 457 | utf8.EncodeRune(rbytes, rf.Char) |
| 455 | 458 | // append refill rune |