update GolangCI-Lint to v1.23.8

This commit is contained in:
Marten Seemann 2020-03-05 10:17:26 +07:00
parent ce64c6b301
commit 0b3340493a
5 changed files with 10 additions and 9 deletions

View file

@ -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

View file

@ -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",

View file

@ -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)

View file

@ -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())

View file

@ -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))
}