MCPcopy Index your code
hub / github.com/google/gvisor / TrimFront

Method TrimFront

pkg/buffer/buffer.go:79–85  ·  view source on GitHub ↗

TrimFront removes the first count bytes from the buffer.

(count int64)

Source from the content-addressed store, hash-verified

77
78// TrimFront removes the first count bytes from the buffer.
79func (b *Buffer) TrimFront(count int64) {
80 if count >= b.size {
81 b.advanceRead(b.size)
82 } else {
83 b.advanceRead(count)
84 }
85}
86
87// ReadAt implements io.ReaderAt.ReadAt.
88func (b *Buffer) ReadAt(p []byte, offset int64) (int, error) {

Callers 5

TestBufferFunction · 0.95
readByteMethod · 0.95
advanceReadMethod · 0.45
AppendMethod · 0.45
SubApplyMethod · 0.45

Calls 1

advanceReadMethod · 0.95

Tested by 1

TestBufferFunction · 0.76