1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-10 13:09:11 -04:00

Fix according to staticcheck result

staticcheck repo: https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck
This commit is contained in:
loyalsoldier
2020-08-30 22:58:00 +08:00
parent 1fa89b32d4
commit f12f76582f
10 changed files with 22 additions and 30 deletions

View File

@@ -8,6 +8,7 @@ import (
"encoding/binary"
"io"
"time"
"v2ray.com/core/common"
)
@@ -21,8 +22,7 @@ func SealVMessAEADHeader(key [16]byte, data []byte) []byte {
aeadPayloadLengthSerializeBuffer := bytes.NewBuffer(nil)
var headerPayloadDataLen uint16
headerPayloadDataLen = uint16(len(data))
headerPayloadDataLen := uint16(len(data))
common.Must(binary.Write(aeadPayloadLengthSerializeBuffer, binary.BigEndian, headerPayloadDataLen))