Skip to content

Commit

Permalink
feat: Bytes() (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlymatthew authored Jun 26, 2024
1 parent e0039ba commit 75b883e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/buftest/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ func NewSeekableBuffer() *SeekableBuffer {
return &SeekableBuffer{}
}

func (b *SeekableBuffer) Bytes() []byte {
return b.buf
}

func (b *SeekableBuffer) Write(p []byte) (int, error) {
n := copy(b.buf[b.pos:], p)
if n < len(p) {
Expand Down

0 comments on commit 75b883e

Please sign in to comment.