mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-23 20:01:34 +00:00
Enable bodyclose linter (#36168)
Enabe [`bodyclose`](https://golangci-lint.run/docs/linters/configuration/#bodyclose). The only issue in non-test code (`services/migrations/dump.go`) was a false-positive and I think there are a number of undetected cases, but I guess it's still better than not having it. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -78,6 +78,7 @@ func TestActivityPubPerson(t *testing.T) {
|
||||
|
||||
// Signed request succeeds
|
||||
resp, err := c.Post([]byte{}, user2inboxurl)
|
||||
defer resp.Body.Close()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, http.StatusNoContent, resp.StatusCode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user