mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
fix(linters): add the bodyclose linter BE-12112 (#959)
This commit is contained in:
parent
da30780ac2
commit
3eab294908
4 changed files with 50 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue