From 4fe6763faf645568b2d1d3fe4cdcfcf6b12cf7e6 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Sat, 21 Oct 2023 16:59:14 -0700 Subject: ci: Use golangci-lint for linting (#121) Instead of hand-managing and running linters, use golangci-lint. Along with the golangci-lint defaults, enable a couple other linters we generally agree with. See also uber-go/zap#1323 for a similar change. As a result of this, we can: - Drop the dependabot for tools - Run the lint job in parallel with build/test - Simplify the Makefile --- handler_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'handler_test.go') diff --git a/handler_test.go b/handler_test.go index e910897..ac0c1e4 100644 --- a/handler_test.go +++ b/handler_test.go @@ -168,7 +168,9 @@ func TestPostRejected(t *testing.T) { res, err := http.Post(srv.URL+tt.path, "text/plain", strings.NewReader("foo")) require.NoError(t, err) - defer res.Body.Close() + defer func() { + assert.NoError(t, res.Body.Close()) + }() body, err := io.ReadAll(res.Body) require.NoError(t, err) -- cgit v1.2.3