forked from quic-go/quic-go
remove unused utils.GetByteOrder
This function was needed when we supported both Q039 (using big endian encoding) and ealier versions (using little endian encoding).
This commit is contained in:
@@ -3,8 +3,6 @@ package utils
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
// A ByteOrder specifies how to convert byte sequences into 16-, 32-, or 64-bit unsigned integers.
|
||||
@@ -25,9 +23,3 @@ type ByteOrder interface {
|
||||
ReadUfloat16(io.ByteReader) (uint64, error)
|
||||
WriteUfloat16(*bytes.Buffer, uint64)
|
||||
}
|
||||
|
||||
// GetByteOrder gets the ByteOrder to represent values on the wire
|
||||
// from QUIC 39, values are encoded in big endian, before that in little endian
|
||||
func GetByteOrder(v protocol.VersionNumber) ByteOrder {
|
||||
return BigEndian
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("Byte Order", func() {
|
||||
It("says little Little Endian for QUIC 39 and TLS", func() {
|
||||
Expect(GetByteOrder(protocol.Version39)).To(Equal(BigEndian))
|
||||
Expect(GetByteOrder(protocol.VersionTLS)).To(Equal(BigEndian))
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user