From d4e425a2517f8939f059d33ca067c320e8ee9daa Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 13 Apr 2022 23:49:09 -0400 Subject: [PATCH] *: pass golangci-lint --- .golangci.yaml | 4 ++++ frontend/udp/frontend_test.go | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index f21a6bc..b3c85aa 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -6,6 +6,10 @@ output: linters-settings: goimports: local-prefixes: "github.com/chihaya/chihaya" + staticcheck: + checks: + - "all" + - "-SA1019" # Allow netErr.Temporary gosec: excludes: - "G404" # Allow the usage of math/rand diff --git a/frontend/udp/frontend_test.go b/frontend/udp/frontend_test.go index b4cff14..1c6e516 100644 --- a/frontend/udp/frontend_test.go +++ b/frontend/udp/frontend_test.go @@ -21,8 +21,7 @@ func TestStartStopRaceIssue437(t *testing.T) { t.Fatal(err) } errC := fe.Stop() - errs := <-errC - if len(errs) != 0 { + if errs := <-errC; len(errs) != 0 { t.Fatal(errs[0]) } }