From 82c9581727c0af09a35ad094d16c91bea4bda318 Mon Sep 17 00:00:00 2001 From: Jacob Elias Date: Tue, 11 Jun 2024 14:34:44 -0500 Subject: [PATCH] feat: linting fixes --- proxyd/backend_test.go | 3 ++- proxyd/cmd/proxyd/main.go | 1 + proxyd/reader_test.go | 3 ++- proxyd/server.go | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/proxyd/backend_test.go b/proxyd/backend_test.go index 7be23bf..73ebebf 100644 --- a/proxyd/backend_test.go +++ b/proxyd/backend_test.go @@ -1,8 +1,9 @@ package proxyd import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestStripXFF(t *testing.T) { diff --git a/proxyd/cmd/proxyd/main.go b/proxyd/cmd/proxyd/main.go index 3daa80b..c2b613c 100644 --- a/proxyd/cmd/proxyd/main.go +++ b/proxyd/cmd/proxyd/main.go @@ -115,6 +115,7 @@ func StartPProf(hostname string, port int) *http.Server { Addr: addr, } + // nolint:errcheck go srv.ListenAndServe() return srv diff --git a/proxyd/reader_test.go b/proxyd/reader_test.go index 2ee2345..396b9bf 100644 --- a/proxyd/reader_test.go +++ b/proxyd/reader_test.go @@ -1,10 +1,11 @@ package proxyd import ( - "github.com/stretchr/testify/require" "io" "strings" "testing" + + "github.com/stretchr/testify/require" ) func TestLimitReader(t *testing.T) { diff --git a/proxyd/server.go b/proxyd/server.go index 527c2e6..c663f42 100644 --- a/proxyd/server.go +++ b/proxyd/server.go @@ -573,7 +573,7 @@ func (s *Server) handleBatchRPC(ctx context.Context, reqs []json.RawMessage, isL } servedByString := "" - for sb, _ := range servedBy { + for sb := range servedBy { if servedByString != "" { servedByString += ", " }