forked from quic-go/quic-go
add the scopelint linter
This commit is contained in:
@@ -17,6 +17,7 @@ linters:
|
||||
- ineffassign
|
||||
- misspell
|
||||
- prealloc
|
||||
- scopelint
|
||||
- staticcheck
|
||||
- structcheck
|
||||
- unconvert
|
||||
|
||||
@@ -161,7 +161,7 @@ var _ = Describe("Handshake drop tests", func() {
|
||||
app := a
|
||||
|
||||
Context(app.name, func() {
|
||||
It(fmt.Sprintf("establishes a connection when the first packet is lost in %s direction", d), func() {
|
||||
It(fmt.Sprintf("establishes a connection when the first packet is lost in %s direction", direction), func() {
|
||||
var incoming, outgoing int32
|
||||
startListenerAndProxy(func(d quicproxy.Direction, _ []byte) bool {
|
||||
var p int32
|
||||
@@ -176,7 +176,7 @@ var _ = Describe("Handshake drop tests", func() {
|
||||
app.run(version)
|
||||
})
|
||||
|
||||
It(fmt.Sprintf("establishes a connection when the second packet is lost in %s direction", d), func() {
|
||||
It(fmt.Sprintf("establishes a connection when the second packet is lost in %s direction", direction), func() {
|
||||
var incoming, outgoing int32
|
||||
startListenerAndProxy(func(d quicproxy.Direction, _ []byte) bool {
|
||||
var p int32
|
||||
@@ -191,7 +191,7 @@ var _ = Describe("Handshake drop tests", func() {
|
||||
app.run(version)
|
||||
})
|
||||
|
||||
It(fmt.Sprintf("establishes a connection when 1/5 of the packets are lost in %s direction", d), func() {
|
||||
It(fmt.Sprintf("establishes a connection when 1/5 of the packets are lost in %s direction", direction), func() {
|
||||
startListenerAndProxy(func(d quicproxy.Direction, _ []byte) bool {
|
||||
return d.Is(direction) && stochasticDropper(5)
|
||||
}, version)
|
||||
|
||||
@@ -109,7 +109,7 @@ var _ = Describe("MITM test", func() {
|
||||
payloadLen := mrand.Int31n(100)
|
||||
replyHdr.Length = protocol.ByteCount(mrand.Int31n(payloadLen + 1))
|
||||
buf := &bytes.Buffer{}
|
||||
Expect(replyHdr.Write(buf, v)).To(Succeed())
|
||||
Expect(replyHdr.Write(buf, version)).To(Succeed())
|
||||
b := make([]byte, payloadLen)
|
||||
mrand.Read(b)
|
||||
buf.Write(b)
|
||||
|
||||
Reference in New Issue
Block a user