(p []byte)
| 40 | } |
| 41 | } |
| 42 | |
| 43 | func (c *fakeConn) Read(p []byte) (n int, err error) { |
| 44 | pos := c.readCount |
| 45 | if c.readCount < len(c.outputs) { |
| 46 | c.readCount++ |
| 47 | return c.outputs[pos].Read(p) |
| 48 | } |
| 49 | return 0, fmt.Errorf("EOF") |
| 50 | } |
| 51 | |
| 52 | func (c *fakeConn) Write(p []byte) (n int, err error) { |