From d5aced6e0389850c53f58aa71f871655a8c3e9ec Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Mon, 6 Jun 2016 09:37:17 +0200 Subject: [PATCH] small linter & typo fixes --- frames/stream_frame_test.go | 4 ++-- h2quic/server.go | 2 +- utils/_gen.go | 2 +- utils/byteinterval_linkedlist.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frames/stream_frame_test.go b/frames/stream_frame_test.go index 921688b76..2815d0d0a 100644 --- a/frames/stream_frame_test.go +++ b/frames/stream_frame_test.go @@ -318,13 +318,13 @@ var _ = Describe("StreamFrame", func() { 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.calculateStreamIDLength() 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.calculateStreamIDLength() Expect(f.streamIDLen).To(Equal(protocol.ByteCount(4))) diff --git a/h2quic/server.go b/h2quic/server.go index 6496cbc32..35c04377f 100644 --- a/h2quic/server.go +++ b/h2quic/server.go @@ -210,7 +210,7 @@ func (s *Server) SetQuicHeaders(hdr http.Header) error { } // 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. func ListenAndServeQUIC(addr, certFile, keyFile string, handler http.Handler) error { server := &Server{ diff --git a/utils/_gen.go b/utils/_gen.go index c5fac41e6..154515b2a 100644 --- a/utils/_gen.go +++ b/utils/_gen.go @@ -1,7 +1,7 @@ package main import ( - _ "github.com/clipperhouse/slice" _ "github.com/clipperhouse/linkedlist" + _ "github.com/clipperhouse/slice" _ "github.com/clipperhouse/stringer" ) diff --git a/utils/byteinterval_linkedlist.go b/utils/byteinterval_linkedlist.go index 2743bac16..545fc2038 100644 --- a/utils/byteinterval_linkedlist.go +++ b/utils/byteinterval_linkedlist.go @@ -56,7 +56,7 @@ func (l *ByteIntervalList) Init() *ByteIntervalList { return l } -// New returns an initialized list. +// NewByteIntervalList returns an initialized list. func NewByteIntervalList() *ByteIntervalList { return new(ByteIntervalList).Init() } // Len returns the number of elements of list l.