aboutsummaryrefslogtreecommitdiff
path: root/handler_test.go
diff options
context:
space:
mode:
authorAbhinav Gupta <mail@abhinavg.net>2023-10-21 16:59:14 -0700
committerGitHub <noreply@github.com>2023-10-21 16:59:14 -0700
commit4fe6763faf645568b2d1d3fe4cdcfcf6b12cf7e6 (patch)
treed823419085562ed0442d061ffdcb519ebdb410b7 /handler_test.go
parent5fbb57ed966154dc29730e0ce62824e1b577d8cb (diff)
downloadsally-4fe6763faf645568b2d1d3fe4cdcfcf6b12cf7e6.tar.gz
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
Diffstat (limited to 'handler_test.go')
-rw-r--r--handler_test.go4
1 files changed, 3 insertions, 1 deletions
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)