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:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user