MCPcopy Index your code
hub / github.com/Monibuca/engine / Read

Method Read

util/buffer.go:104–112  ·  view source on GitHub ↗
(buf []byte)

Source from the content-addressed store, hash-verified

102}
103
104func (b *Buffer) Read(buf []byte) (n int, err error) {
105 if !b.CanReadN(len(buf)) {
106 copy(buf, *b)
107 return b.Len(), io.EOF
108 }
109 ret := b.ReadN(len(buf))
110 copy(buf, ret)
111 return len(ret), err
112}
113
114func (b *Buffer) ReadN(n int) Buffer {
115 l := b.Len()

Callers

nothing calls this directly

Calls 3

CanReadNMethod · 0.95
LenMethod · 0.95
ReadNMethod · 0.95

Tested by

no test coverage detected