fix(linters): add the bodyclose linter BE-12112 (#959)
This commit is contained in:
@@ -33,8 +33,13 @@ func TestLimitAccess(t *testing.T) {
|
||||
|
||||
ts := httptest.NewServer(handler)
|
||||
defer ts.Close()
|
||||
http.Get(ts.URL)
|
||||
|
||||
resp, err := http.Get(ts.URL)
|
||||
if err == nil {
|
||||
resp.Body.Close()
|
||||
}
|
||||
|
||||
resp, err = http.Get(ts.URL)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user