Function
newProgressReader
(ra content.ReaderAt, p func(int64))
Source from the content-addressed store, hash-verified
| 173 | } |
| 174 | |
| 175 | func newProgressReader(ra content.ReaderAt, p func(int64)) io.ReadCloser { |
| 176 | return &progressReader{ |
| 177 | rc: &readCounter{ |
| 178 | r: content.NewReader(ra), |
| 179 | c: 0, |
| 180 | }, |
| 181 | c: ra, |
| 182 | p: p, |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | func (pr *progressReader) Read(p []byte) (n int, err error) { |
| 187 | // Call the progress function with the current count, indicating |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…