1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 12:35:21 -05:00

fix lint warnings

This commit is contained in:
Darien Raymond
2018-11-19 00:33:00 +01:00
parent b1b8cb5ef5
commit 83c4b20b6e
3 changed files with 29 additions and 7 deletions

View File

@@ -94,3 +94,16 @@ func TestMultiBufferSplitFirst(t *testing.T) {
t.Error("expect empty buffer, but got ", mb.String())
}
}
func BenchmarkSplitBytes(b *testing.B) {
var mb MultiBuffer
raw := make([]byte, Size)
b.ResetTimer()
for i := 0; i < b.N; i++ {
buffer := StackNew()
buffer.Extend(Size)
mb = append(mb, &buffer)
mb, _ = SplitBytes(mb, raw)
}
}