mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
Add a bytes method to alloc.buffer
This commit is contained in:
parent
05caf04eee
commit
e2acec745c
@ -40,6 +40,10 @@ func (b *Buffer) Append(data []byte) *Buffer {
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *Buffer) Bytes() []byte {
|
||||
return b.Value
|
||||
}
|
||||
|
||||
// Slice cuts the buffer at the given position.
|
||||
func (b *Buffer) Slice(from, to int) *Buffer {
|
||||
b.Value = b.Value[from:to]
|
||||
|
Loading…
Reference in New Issue
Block a user