forked from quic-go/quic-go
small linter & typo fixes
This commit is contained in:
@@ -318,13 +318,13 @@ var _ = Describe("StreamFrame", func() {
|
|||||||
Expect(f.streamIDLen).To(Equal(protocol.ByteCount(2)))
|
Expect(f.streamIDLen).To(Equal(protocol.ByteCount(2)))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("determines the length of a 1 byte StreamID", func() {
|
It("determines the length of a 3 byte StreamID", func() {
|
||||||
f := &StreamFrame{StreamID: 0xFFFFFF}
|
f := &StreamFrame{StreamID: 0xFFFFFF}
|
||||||
f.calculateStreamIDLength()
|
f.calculateStreamIDLength()
|
||||||
Expect(f.streamIDLen).To(Equal(protocol.ByteCount(3)))
|
Expect(f.streamIDLen).To(Equal(protocol.ByteCount(3)))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("determines the length of a 1 byte StreamID", func() {
|
It("determines the length of a 4 byte StreamID", func() {
|
||||||
f := &StreamFrame{StreamID: 0xFFFFFFFF}
|
f := &StreamFrame{StreamID: 0xFFFFFFFF}
|
||||||
f.calculateStreamIDLength()
|
f.calculateStreamIDLength()
|
||||||
Expect(f.streamIDLen).To(Equal(protocol.ByteCount(4)))
|
Expect(f.streamIDLen).To(Equal(protocol.ByteCount(4)))
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ func (s *Server) SetQuicHeaders(hdr http.Header) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ListenAndServeQUIC listens on the UDP network address addr and calls the
|
// ListenAndServeQUIC listens on the UDP network address addr and calls the
|
||||||
// handler for HTTP/2 requests on incoming conections. http.DefaultServeMux is
|
// handler for HTTP/2 requests on incoming connections. http.DefaultServeMux is
|
||||||
// used when handler is nil.
|
// used when handler is nil.
|
||||||
func ListenAndServeQUIC(addr, certFile, keyFile string, handler http.Handler) error {
|
func ListenAndServeQUIC(addr, certFile, keyFile string, handler http.Handler) error {
|
||||||
server := &Server{
|
server := &Server{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "github.com/clipperhouse/slice"
|
|
||||||
_ "github.com/clipperhouse/linkedlist"
|
_ "github.com/clipperhouse/linkedlist"
|
||||||
|
_ "github.com/clipperhouse/slice"
|
||||||
_ "github.com/clipperhouse/stringer"
|
_ "github.com/clipperhouse/stringer"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func (l *ByteIntervalList) Init() *ByteIntervalList {
|
|||||||
return l
|
return l
|
||||||
}
|
}
|
||||||
|
|
||||||
// New returns an initialized list.
|
// NewByteIntervalList returns an initialized list.
|
||||||
func NewByteIntervalList() *ByteIntervalList { return new(ByteIntervalList).Init() }
|
func NewByteIntervalList() *ByteIntervalList { return new(ByteIntervalList).Init() }
|
||||||
|
|
||||||
// Len returns the number of elements of list l.
|
// Len returns the number of elements of list l.
|
||||||
|
|||||||
Reference in New Issue
Block a user