(b []byte, off int64)
| 19 | } |
| 20 | |
| 21 | func (s *StdinWrap) ReadAt(b []byte, off int64) (int, error) { |
| 22 | e := off + int64(len(b)) - 1 |
| 23 | |
| 24 | for e+1 > s.end { |
| 25 | b2 := make([]byte, e-s.end+1) |
| 26 | n, err := s.stdin.Read(b2) |
| 27 | if err != nil { |
| 28 | return 0, err // n value here is questionable |
| 29 | } |
| 30 | |
| 31 | s.end += int64(n) |
| 32 | |
| 33 | s.data = append(s.data, b2[:n]...) |
| 34 | } |
| 35 | |
| 36 | i := 0 |
| 37 | for a := off; a <= e; a++ { |
| 38 | b[i] = s.data[a] |
| 39 | i++ |
| 40 | } |
| 41 | |
| 42 | return len(b), nil |
| 43 | } |
| 44 | |
| 45 | func (s *StdinWrap) Flush() { |
| 46 | for { |
no outgoing calls
no test coverage detected