mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-30 14:05:26 -05:00
rename Slice and Slice from to Resize and Advance
This commit is contained in:
@@ -97,8 +97,8 @@ func (b *Buffer) BytesTo(to int32) []byte {
|
||||
return b.v[b.start : b.start+to]
|
||||
}
|
||||
|
||||
// Slice cuts the buffer at the given position.
|
||||
func (b *Buffer) Slice(from, to int32) {
|
||||
// Resize cuts the buffer at the given position.
|
||||
func (b *Buffer) Resize(from, to int32) {
|
||||
if from < 0 {
|
||||
from += b.Len()
|
||||
}
|
||||
@@ -112,8 +112,8 @@ func (b *Buffer) Slice(from, to int32) {
|
||||
b.start += from
|
||||
}
|
||||
|
||||
// SliceFrom cuts the buffer at the given position.
|
||||
func (b *Buffer) SliceFrom(from int32) {
|
||||
// Advance cuts the buffer at the given position.
|
||||
func (b *Buffer) Advance(from int32) {
|
||||
if from < 0 {
|
||||
from += b.Len()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user