golangci-lint/test/testdata/bodyclose.go
Isaev Denis 9ba730e989
Make incremental analysis (#808)
Cache linting results. Reanalyze only changed packages
and packages tree depending on them.

Fixes #768, fixes #809
2019-10-13 17:40:51 +03:00

13 lines
222 B
Go

//args: -Ebodyclose
package testdata
import (
"io/ioutil"
"net/http"
)
func BodycloseNotClosed() {
resp, _ := http.Get("https://google.com") // ERROR "response body must be closed"
_, _ = ioutil.ReadAll(resp.Body)
}