add the exhaustive linter

This commit is contained in:
Marten Seemann
2020-08-20 14:03:42 +07:00
parent 2781606ded
commit 55a07c34ee
16 changed files with 25 additions and 0 deletions

View File

@@ -203,6 +203,7 @@ var _ = Describe("Handshake drop tests", func() {
var incoming, outgoing int32
startListenerAndProxy(func(d quicproxy.Direction, _ []byte) bool {
var p int32
//nolint:exhaustive
switch d {
case quicproxy.DirectionIncoming:
p = atomic.AddInt32(&incoming, 1)
@@ -218,6 +219,7 @@ var _ = Describe("Handshake drop tests", func() {
var incoming, outgoing int32
startListenerAndProxy(func(d quicproxy.Direction, _ []byte) bool {
var p int32
//nolint:exhaustive
switch d {
case quicproxy.DirectionIncoming:
p = atomic.AddInt32(&incoming, 1)

View File

@@ -37,6 +37,7 @@ var _ = Describe("Packetization", func() {
proxy, err = quicproxy.NewQuicProxy("localhost:0", &quicproxy.Opts{
RemoteAddr: serverAddr,
DelayPacket: func(dir quicproxy.Direction, _ []byte) time.Duration {
//nolint:exhaustive
switch dir {
case quicproxy.DirectionIncoming:
atomic.AddUint32(&incoming, 1)