diff --git a/.travis.yml b/.travis.yml index 015d3641..aaad3690 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ before_install: script: - | if [ ${TESTMODE} == "lint" ]; then - travis_retry curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.18.0 + travis_retry curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.23.8 fi - .travis/script.sh diff --git a/integrationtests/self/zero_rtt_test.go b/integrationtests/self/zero_rtt_test.go index dce94a0c..fa73fe25 100644 --- a/integrationtests/self/zero_rtt_test.go +++ b/integrationtests/self/zero_rtt_test.go @@ -363,7 +363,6 @@ var _ = Describe("0-RTT", func() { }) It("rejects 0-RTT when the ALPN changed", func() { - const maxStreams = 42 tlsConf := getTLSConfig() ln, err := quic.ListenAddrEarly( "localhost:0", diff --git a/internal/handshake/crypto_setup_test.go b/internal/handshake/crypto_setup_test.go index 76249385..d0e8f617 100644 --- a/internal/handshake/crypto_setup_test.go +++ b/internal/handshake/crypto_setup_test.go @@ -54,6 +54,8 @@ func (s *stream) Write(b []byte) (int, error) { var _ = Describe("Crypto Setup TLS", func() { var clientConf, serverConf *tls.Config + // unparam incorrectly complains that the first argument is never used. + //nolint:unparam initStreams := func() (chan chunk, *stream /* initial */, *stream /* handshake */) { chunkChan := make(chan chunk, 100) initialStream := newStream(chunkChan, protocol.EncryptionInitial) diff --git a/packet_packer_test.go b/packet_packer_test.go index 35aa639f..7b08c67e 100644 --- a/packet_packer_test.go +++ b/packet_packer_test.go @@ -547,7 +547,7 @@ var _ = Describe("Packet packer", func() { extHdr, err := hdr.ParseExtended(r, packer.version) Expect(err).ToNot(HaveOccurred()) Expect(extHdr.PacketNumberLen).To(Equal(protocol.PacketNumberLen1)) - Expect(r.Len()).To(Equal(4 - 1 /* packet number length */ + int(sealer.Overhead()))) + Expect(r.Len()).To(Equal(4 - 1 /* packet number length */ + sealer.Overhead())) // the first bytes of the payload should be a 2 PADDING frames... firstPayloadByte, err := r.ReadByte() Expect(err).ToNot(HaveOccurred()) diff --git a/qlog/qlog_suite_test.go b/qlog/qlog_suite_test.go index f47c5e60..04316e7c 100644 --- a/qlog/qlog_suite_test.go +++ b/qlog/qlog_suite_test.go @@ -15,20 +15,20 @@ func TestQlog(t *testing.T) { func checkEncoding(data []byte, expected map[string](interface{})) { // unmarshal the data - m := make(map[string](interface{})) + m := make(map[string]interface{}) ExpectWithOffset(1, json.Unmarshal(data, &m)).To(Succeed()) ExpectWithOffset(1, m).To(HaveLen(len(expected))) for key, value := range expected { - switch value.(type) { + switch v := value.(type) { case string: - ExpectWithOffset(1, m).To(HaveKeyWithValue(key, value)) + ExpectWithOffset(1, m).To(HaveKeyWithValue(key, v)) case int: - ExpectWithOffset(1, m).To(HaveKeyWithValue(key, float64(value.(int)))) + ExpectWithOffset(1, m).To(HaveKeyWithValue(key, float64(v))) case bool: - ExpectWithOffset(1, m).To(HaveKeyWithValue(key, value.(bool))) + ExpectWithOffset(1, m).To(HaveKeyWithValue(key, v)) case [][]string: // used in the ACK frame ExpectWithOffset(1, m).To(HaveKey(key)) - for i, l := range value.([][]string) { + for i, l := range v { for j, s := range l { ExpectWithOffset(1, m[key].([]interface{})[i].([]interface{})[j].(string)).To(Equal(s)) }