rename frame struct to renderFrame
Vladimir Bauer
4 years ago
| 19 | 19 | index int // used by heap |
| 20 | 20 | priority int // used by heap |
| 21 | 21 | hasEwma bool |
| 22 | frameCh chan *frame | |
| 22 | frameCh chan *renderFrame | |
| 23 | 23 | operateState chan func(*bState) |
| 24 | 24 | done chan struct{} |
| 25 | 25 | container *Progress |
| 60 | 60 | sync bool |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | type frame struct { | |
| 63 | type renderFrame struct { | |
| 64 | 64 | reader io.Reader |
| 65 | 65 | lines int |
| 66 | 66 | shutdown bool |
| 72 | 72 | bar := &Bar{ |
| 73 | 73 | priority: bs.priority, |
| 74 | 74 | hasEwma: len(bs.ewmaDecorators) != 0, |
| 75 | frameCh: make(chan *frame, 1), | |
| 75 | frameCh: make(chan *renderFrame, 1), | |
| 76 | 76 | operateState: make(chan func(*bState)), |
| 77 | 77 | done: make(chan struct{}), |
| 78 | 78 | container: container, |
| 341 | 341 | reader, lines = s.extender(nil, s.reqWidth, stat) |
| 342 | 342 | b.recoveredPanic = p |
| 343 | 343 | } |
| 344 | frame := frame{ | |
| 344 | frame := renderFrame{ | |
| 345 | 345 | reader: reader, |
| 346 | 346 | lines: lines + 1, |
| 347 | 347 | shutdown: s.completed || s.aborted, |
| 364 | 364 | reader = s.draw(stat) |
| 365 | 365 | } |
| 366 | 366 | reader, lines = s.extender(reader, s.reqWidth, stat) |
| 367 | b.frameCh <- &frame{ | |
| 367 | b.frameCh <- &renderFrame{ | |
| 368 | 368 | reader: reader, |
| 369 | 369 | lines: lines + 1, |
| 370 | 370 | } |