MCPcopy
hub / github.com/go-sql-driver/mysql / Read

Method Read

packets_test.go:40–54  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

38}
39
40func (m *mockConn) Read(b []byte) (n int, err error) {
41 if m.closed {
42 return 0, errConnClosed
43 }
44
45 m.reads++
46 if m.maxReads > 0 && m.reads > m.maxReads {
47 return 0, errConnTooManyReads
48 }
49
50 n = copy(b, m.data)
51 m.read += n
52 m.data = m.data[n:]
53 return
54}
55func (m *mockConn) Write(b []byte) (n int, err error) {
56 if m.closed {
57 return 0, errConnClosed

Callers 4

makeRandByteSliceFunction · 0.45
connCheckFunction · 0.45
handleInFileRequestMethod · 0.45
readWithTimeoutMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected