MCPcopy Create free account
hub / github.com/buger/jsonparser / Read

Method Read

reader_parser_test.go:254–264  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

252}
253
254func (r *fixedChunkReader) Read(p []byte) (int, error) {
255 if r.pos == len(r.data) {
256 return 0, io.EOF
257 }
258 if len(p) > r.chunk {
259 p = p[:r.chunk]
260 }
261 n := copy(p, r.data[r.pos:])
262 r.pos += n
263 return n, nil
264}

Callers 1

readMoreMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected