mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-17 23:06:30 -05:00
Fix unused variables
This commit is contained in:
parent
26ebd8dde9
commit
a7f40da07a
@ -129,7 +129,9 @@ func (this *ClientSession) DecodeResponseHeader(reader io.Reader) (*protocol.Res
|
||||
}
|
||||
data := buffer.Value[:dataLen]
|
||||
command, err := UnmarshalCommand(cmdId, data)
|
||||
header.Command = command
|
||||
if err == nil {
|
||||
header.Command = command
|
||||
}
|
||||
}
|
||||
|
||||
return header, nil
|
||||
|
@ -18,7 +18,7 @@ func TestParseBytes(t *testing.T) {
|
||||
assert.Error(err).IsNil()
|
||||
assert.String(uuid).Equals(str)
|
||||
|
||||
uuid, err = ParseBytes([]byte{1, 3, 2, 4})
|
||||
_, err = ParseBytes([]byte{1, 3, 2, 4})
|
||||
assert.Error(err).Equals(ErrorInvalidID)
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ func TestRegisterInboundConfig(t *testing.T) {
|
||||
assert.Error(err).IsNil()
|
||||
|
||||
configObj, err = CreateOutboundConfig(protocol, nil)
|
||||
assert.Error(err).IsNotNil()
|
||||
assert.Pointer(configObj).IsNil()
|
||||
}
|
||||
|
||||
@ -44,5 +45,6 @@ func TestRegisterOutboundConfig(t *testing.T) {
|
||||
assert.Error(err).IsNil()
|
||||
|
||||
configObj, err = CreateInboundConfig(protocol, nil)
|
||||
assert.Error(err).IsNotNil()
|
||||
assert.Pointer(configObj).IsNil()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user