newBlockingReader creates a new partialReader in locked state
(reader io.ReadCloser)
| 73 | |
| 74 | // newBlockingReader creates a new partialReader in locked state |
| 75 | func newBlockingReader(reader io.ReadCloser) *blockingReader { |
| 76 | r := &blockingReader{ |
| 77 | reader: reader, |
| 78 | } |
| 79 | r.mu.Lock() |
| 80 | return r |
| 81 | } |
| 82 | |
| 83 | // Read reads data from the testReader, simulating a slow read and a potential failure |
| 84 | func (r *blockingReader) Read(p []byte) (n int, err error) { |
no outgoing calls
no test coverage detected