mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-11-07 07:57:16 -05:00
remove unnecessary assignment
This commit is contained in:
@@ -70,8 +70,8 @@ func TestRandom(t *testing.T) {
|
||||
func TestEquals(t *testing.T) {
|
||||
assert := With(t)
|
||||
|
||||
var uuid *UUID = nil
|
||||
var uuid2 *UUID = nil
|
||||
var uuid *UUID
|
||||
var uuid2 *UUID
|
||||
assert(uuid.Equals(uuid2), IsTrue)
|
||||
|
||||
uuid3 := New()
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *ClientSession) EncodeRequestBody(request *protocol.RequestHeader, write
|
||||
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||
sizeParser = NewShakeSizeParser(c.requestBodyIV[:])
|
||||
}
|
||||
var padding crypto.PaddingLengthGenerator = nil
|
||||
var padding crypto.PaddingLengthGenerator
|
||||
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
||||
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
||||
}
|
||||
@@ -200,7 +200,7 @@ func (c *ClientSession) DecodeResponseBody(request *protocol.RequestHeader, read
|
||||
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||
sizeParser = NewShakeSizeParser(c.responseBodyIV[:])
|
||||
}
|
||||
var padding crypto.PaddingLengthGenerator = nil
|
||||
var padding crypto.PaddingLengthGenerator
|
||||
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
||||
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ func (s *ServerSession) DecodeRequestBody(request *protocol.RequestHeader, reade
|
||||
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||
sizeParser = NewShakeSizeParser(s.requestBodyIV[:])
|
||||
}
|
||||
var padding crypto.PaddingLengthGenerator = nil
|
||||
var padding crypto.PaddingLengthGenerator
|
||||
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
||||
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
||||
}
|
||||
@@ -293,7 +293,7 @@ func (s *ServerSession) EncodeResponseBody(request *protocol.RequestHeader, writ
|
||||
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||
sizeParser = NewShakeSizeParser(s.responseBodyIV[:])
|
||||
}
|
||||
var padding crypto.PaddingLengthGenerator = nil
|
||||
var padding crypto.PaddingLengthGenerator
|
||||
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
||||
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user