(p []byte)
| 232 | } |
| 233 | |
| 234 | func (r *repeatedByteReader) Read(p []byte) (int, error) { |
| 235 | if r.remaining == 0 { |
| 236 | return 0, io.EOF |
| 237 | } |
| 238 | if int64(len(p)) > r.remaining { |
| 239 | p = p[:r.remaining] |
| 240 | } |
| 241 | for i := range p { |
| 242 | p[i] = r.value |
| 243 | } |
| 244 | r.remaining -= int64(len(p)) |
| 245 | return len(p), nil |
| 246 | } |
| 247 | |
| 248 | type fixedChunkReader struct { |
| 249 | data []byte |
nothing calls this directly
no outgoing calls
no test coverage detected