- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for newTestConn (0.18 sec)
-
src/net/http/serve_test.go
type testConn struct { readMu sync.Mutex // for TestHandlerBodyClose readBuf bytes.Buffer writeBuf bytes.Buffer closec chan bool // 1-buffered; receives true when Close is called noopConn } func newTestConn() *testConn { return &testConn{closec: make(chan bool, 1)} } func (c *testConn) Read(b []byte) (int, error) { c.readMu.Lock() defer c.readMu.Unlock() return c.readBuf.Read(b) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K bytes - Viewed (0)