1
0
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:
Darien Raymond
2018-04-19 23:48:38 +02:00
parent 1425fd2ba9
commit 3997d13b97
8 changed files with 13 additions and 13 deletions

View File

@@ -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()
}