mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 17:46:58 -05:00
remove unnecessary assignment
This commit is contained in:
parent
6f7c30ad51
commit
953bfac572
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user