diff options
Diffstat (limited to 'vendor/codeberg.org/gruf/go-byteutil')
-rw-r--r-- | vendor/codeberg.org/gruf/go-byteutil/buffer.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/codeberg.org/gruf/go-byteutil/buffer.go b/vendor/codeberg.org/gruf/go-byteutil/buffer.go index 75b4c61c7..9e15c8ade 100644 --- a/vendor/codeberg.org/gruf/go-byteutil/buffer.go +++ b/vendor/codeberg.org/gruf/go-byteutil/buffer.go @@ -127,3 +127,8 @@ func (buf *Buffer) Reset() { func (buf *Buffer) String() string { return B2S(buf.B) } + +// Full returns the full capacity byteslice allocated for this buffer. +func (buf *Buffer) Full() []byte { + return buf.B[0:cap(buf.B)] +} |