diff --git a/internal/utils/typeconv.go b/internal/utils/typeconv.go index 7244005..5548717 100644 --- a/internal/utils/typeconv.go +++ b/internal/utils/typeconv.go @@ -3,8 +3,7 @@ package utils func Uint16ToUint8(a []uint16) []uint8 { b := make([]uint8, 0) for _, v := range a { - b = append(b, uint8(v>>8)) - b = append(b, uint8(v)) + b = append(b, uint8(v>>8), uint8(v)) } return b } diff --git a/quic_client_initial.go b/quic_client_initial.go index 6216423..272177e 100644 --- a/quic_client_initial.go +++ b/quic_client_initial.go @@ -10,8 +10,6 @@ import ( "time" ) -// skipcq: GSC-G505 - type ClientInitial struct { Header *QUICHeader `json:"header,omitempty"` // QUIC header FrameTypes []uint64 `json:"frames,omitempty"` // frames ID in order diff --git a/quic_transport_parameters.go b/quic_transport_parameters.go index 13db1b9..1ff835b 100644 --- a/quic_transport_parameters.go +++ b/quic_transport_parameters.go @@ -43,7 +43,7 @@ type QUICTransportParameters struct { // TLS Extension "QUIC Transport Parameters" (57) // // If any error occurs, the returned struct will have parseError set to the error. -func ParseQUICTransportParameters(extData []byte) *QUICTransportParameters { +func ParseQUICTransportParameters(extData []byte) *QUICTransportParameters { // skipcq: GO-R1005 qtp := &QUICTransportParameters{ parseError: errors.New("unknown error"), }