remove the wire.ShortHeader in favor of more return values (#3535)

This commit is contained in:
Marten Seemann 2022-08-30 14:37:36 +03:00 committed by GitHub
parent 5cd5341545
commit 656f3d2d7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 125 additions and 131 deletions

View file

@ -9,6 +9,7 @@ import (
time "time"
gomock "github.com/golang/mock/gomock"
protocol "github.com/lucas-clemente/quic-go/internal/protocol"
wire "github.com/lucas-clemente/quic-go/internal/wire"
)
@ -51,13 +52,15 @@ func (mr *MockUnpackerMockRecorder) UnpackLongHeader(hdr, rcvTime, data interfac
}
// UnpackShortHeader mocks base method.
func (m *MockUnpacker) UnpackShortHeader(rcvTime time.Time, data []byte) (*wire.ShortHeader, []byte, error) {
func (m *MockUnpacker) UnpackShortHeader(rcvTime time.Time, data []byte) (protocol.PacketNumber, protocol.PacketNumberLen, protocol.KeyPhaseBit, []byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UnpackShortHeader", rcvTime, data)
ret0, _ := ret[0].(*wire.ShortHeader)
ret1, _ := ret[1].([]byte)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
ret0, _ := ret[0].(protocol.PacketNumber)
ret1, _ := ret[1].(protocol.PacketNumberLen)
ret2, _ := ret[2].(protocol.KeyPhaseBit)
ret3, _ := ret[3].([]byte)
ret4, _ := ret[4].(error)
return ret0, ret1, ret2, ret3, ret4
}
// UnpackShortHeader indicates an expected call of UnpackShortHeader.