From 622f6a2638bc48c88dc5853c38c91b8745d93a72 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Sun, 27 Aug 2023 20:56:47 -0700 Subject: [PATCH] seekbuf: add Bytes method. --- seekbuf/seekbuf.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/seekbuf/seekbuf.go b/seekbuf/seekbuf.go index 595433c..676b596 100644 --- a/seekbuf/seekbuf.go +++ b/seekbuf/seekbuf.go @@ -55,3 +55,8 @@ func (b *Buffer) Close() error { func (b *Buffer) Len() int { return len(b.data[b.pos:]) } + +// Bytes returns the underlying bytes from the current position. +func (b *Buffer) Bytes() []byte { + return b.data[b.pos:] +}