mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-06 21:37:38 +03:00
parent
0f7de716ac
commit
c7ef05a85b
2 changed files with 9 additions and 10 deletions
|
@ -331,6 +331,10 @@ func (b *Buffer) Len() int {
|
|||
}
|
||||
|
||||
func (b *Buffer) Cap() int {
|
||||
return b.capacity
|
||||
}
|
||||
|
||||
func (b *Buffer) RawCap() int {
|
||||
return len(b.data)
|
||||
}
|
||||
|
||||
|
@ -338,10 +342,6 @@ func (b *Buffer) Bytes() []byte {
|
|||
return b.data[b.start:b.end]
|
||||
}
|
||||
|
||||
func (b *Buffer) Slice() []byte {
|
||||
return b.data[:b.capacity]
|
||||
}
|
||||
|
||||
func (b *Buffer) From(n int) []byte {
|
||||
return b.data[b.start+n : b.end]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue