remove legacy
Vladimir Bauer
6 years ago
| 111 | 111 | return bar |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | // RemoveAllPrependers removes all prepend functions. | |
| 115 | func (b *Bar) RemoveAllPrependers() { | |
| 116 | select { | |
| 117 | case b.operateState <- func(s *bState) { s.pDecorators = nil }: | |
| 118 | case <-b.done: | |
| 119 | } | |
| 120 | } | |
| 121 | ||
| 122 | // RemoveAllAppenders removes all append functions. | |
| 123 | func (b *Bar) RemoveAllAppenders() { | |
| 124 | select { | |
| 125 | case b.operateState <- func(s *bState) { s.aDecorators = nil }: | |
| 126 | case <-b.done: | |
| 127 | } | |
| 128 | } | |
| 129 | ||
| 130 | 114 | // ProxyReader wraps r with metrics required for progress tracking. |
| 131 | 115 | func (b *Bar) ProxyReader(r io.Reader) io.ReadCloser { |
| 132 | 116 | if r == nil { |