protocol: rename VersionNumber to Version (#4295)

This commit is contained in:
Marten Seemann
2024-02-01 12:57:33 +07:00
committed by GitHub
parent 69ba7acb9f
commit fbaa941ea1
81 changed files with 368 additions and 364 deletions

View File

@@ -101,8 +101,8 @@ func (e *HandshakeTimeoutError) Is(target error) bool { return target == net.Err
// A VersionNegotiationError occurs when the client and the server can't agree on a QUIC version.
type VersionNegotiationError struct {
Ours []protocol.VersionNumber
Theirs []protocol.VersionNumber
Ours []protocol.Version
Theirs []protocol.Version
}
func (e *VersionNegotiationError) Error() string {

View File

@@ -108,8 +108,8 @@ var _ = Describe("QUIC Errors", func() {
Context("Version Negotiation errors", func() {
It("has a string representation", func() {
Expect((&VersionNegotiationError{
Ours: []protocol.VersionNumber{2, 3},
Theirs: []protocol.VersionNumber{4, 5, 6},
Ours: []protocol.Version{2, 3},
Theirs: []protocol.Version{4, 5, 6},
}).Error()).To(Equal("no compatible QUIC version found (we support [0x2 0x3], server offered [0x4 0x5 0x6])"))
})
})