github.com/chenfeining/golangci-lint@v1.0.2-0.20230730162517-14c6c67868df/test/testdata/bodyclose.go (about) 1 //golangcitest:args -Ebodyclose 2 package testdata 3 4 import ( 5 "io/ioutil" 6 "net/http" 7 ) 8 9 func BodycloseNotClosed() { 10 resp, _ := http.Get("https://google.com") // want "response body must be closed" 11 _, _ = ioutil.ReadAll(resp.Body) 12 }