MCPcopy Create free account
hub / github.com/koding/kite / Read

Method Read

sockjsclient/xhr_test.go:18–30  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

16}
17
18func (fk *fakeReader) Read(p []byte) (int, error) {
19 q, ok := <-fk.p
20 if !ok {
21 if fk.err == nil {
22 return 0, io.EOF
23 }
24 return 0, fk.err
25 }
26 if len(q) > len(p) {
27 panic(io.ErrShortBuffer)
28 }
29 return copy(p, q), nil
30}
31
32func TestFrameReader(t *testing.T) {
33 const timeout = 100 * time.Millisecond

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected