MCPcopy Create free account
hub / github.com/djherbis/buffer / Read

Method Read

wrapio/limitwrap.go:61–67  ·  view source on GitHub ↗

Read reads from the current offset into p, wrapping at Cap()

(p []byte)

Source from the content-addressed store, hash-verified

59
60// Read reads from the current offset into p, wrapping at Cap()
61func (wpr *Wrapper) Read(p []byte) (n int, err error) {
62 n, err = wpr.ReadAt(p, 0)
63 wpr.L -= int64(n)
64 wpr.O += int64(n)
65 wpr.O %= wpr.N
66 return n, err
67}
68
69// ReadAt reads from the current offset+off into p, wrapping at Cap()
70func (wpr *Wrapper) ReadAt(p []byte, off int64) (n int, err error) {

Callers 1

ReadAtMethod · 0.45

Calls 1

ReadAtMethod · 0.95

Tested by

no test coverage detected