Codebase list golang-github-vbauerster-mpb / 4a83937
minor: send only chan as param Vladimir Bauer 3 years ago
2 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
447447 }
448448 }
449449
450 func (b *Bar) forceRefresh(refreshCh chan interface{}) {
450 func (b *Bar) forceRefresh(refreshCh chan<- interface{}) {
451451 b.container.bwg.Add(1)
452452 go b.forceRefreshImpl(refreshCh)
453453 }
454454
455 func (b *Bar) forceRefreshImpl(refreshCh chan interface{}) {
455 func (b *Bar) forceRefreshImpl(refreshCh chan<- interface{}) {
456456 defer b.container.bwg.Done()
457457 var anyOtherRunning bool
458458 b.container.traverseBars(func(bar *Bar) bool {
2323 }
2424
2525 type iterData struct {
26 iter chan *Bar
26 iter chan<- *Bar
2727 drop chan struct{}
2828 }
2929
110110 m <- heapRequest{cmd: h_push, data: data}
111111 }
112112
113 func (m heapManager) iter(iter chan *Bar, drop chan struct{}) {
113 func (m heapManager) iter(iter chan<- *Bar, drop chan struct{}) {
114114 data := iterData{iter, drop}
115115 m <- heapRequest{cmd: h_iter, data: data}
116116 }
117117
118 func (m heapManager) drain(iter chan *Bar, drop chan struct{}) {
118 func (m heapManager) drain(iter chan<- *Bar, drop chan struct{}) {
119119 data := iterData{iter, drop}
120120 m <- heapRequest{cmd: h_drain, data: data}
121121 }