MCPcopy Index your code
hub / github.com/imroc/req / Read

Method Read

decode.go:101–112  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

99}
100
101func (a *autoDecodeReadCloser) Read(p []byte) (n int, err error) {
102 if !a.detected {
103 return a.peekRead(p)
104 }
105 if a.peek != nil {
106 return a.peekDrain(p)
107 }
108 if a.decodeReader != nil {
109 return a.decodeReader.Read(p)
110 }
111 return a.ReadCloser.Read(p) // can not determine charset, not decode
112}

Callers

nothing calls this directly

Calls 3

peekReadMethod · 0.95
peekDrainMethod · 0.95
ReadMethod · 0.45

Tested by

no test coverage detected