You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i tried to access response.Header.Get within function that accept pointer to http.Request as argument.
but, resulting error nil ponter dereference.
where did the pointer go ?
i am new in Go and sorry for my bad english.
Hi @foobar1221 I misread the comments. the documentation is clear.
// Response is the redirect response which caused this request// be created. ___ This field is only populated during client redirects. ___Response*Response
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
i tried to access
response.Header.Get
within function that accept pointer tohttp.Request
as argument.but, resulting error nil ponter dereference.
where did the pointer go ?
i am new in Go and sorry for my bad english.
What did you expect to see?
nothing
What did you see instead?
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x1fa468]
goroutine 1 [running]:
go-down/network.Download(0x4000104c30, 0x4000162000, 0x272393, 0x3, 0xffffff7a86f6)
/home/bokuno/go/workspace/go-down/network/download.go:47 +0x128
main.main()
/home/bokuno/go/workspace/go-down/cmd/main.go:42 +0x124
The text was updated successfully, but these errors were encountered: