-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: runtime error: invalid memory address or nil pointer dereference #8
Comments
example package main
import (
"io"
"net/http"
)
func closeBody(c io.ReadCloser) {
_ = c.Close()
}
func main() {
resp, _ := http.Get("https://example.com")
defer closeBody(resp.Body)
} |
Hi, goroutine 34 [running]: |
The text was updated successfully, but these errors were encountered: