-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
go http concurrency request to outside #15479
Comments
Please provide a runnable piece of sample code that demonstrates the On Thu, 28 Apr 2016, 19:41 John Kou, [email protected] wrote:
|
var job_temp HTTP
|
type HTTP struct { |
Thank you for providing a code sample, in future, please provide it in a runnable form. What you have provided is not runnable. With that said, you are ignoring the error from json decode, which if it fails will probably leave job_temp undefined. I'm guessing your program crashes at the switch on job_temp.RequestMethod. The rest of your program is also ignoring any error checking. You must check each and every error if you want to want to use the result from an operation that can possibly return an error. I am going to close this error as there is no bug to be fixed. We do not use the issue tracker for general discussion, I recommend you ask your question in another forum, see https://golang.org/wiki/Questions. |
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.4.2 linux/amd64
go env
)?CentOS 7.2 Minimal Desktop
(Linux Development 3.10.0-327.el7.x86_64 cmd/cgo: fails with gcc 4.4.1 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux)
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/xxxxxxx/Desktop/maas"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
go http concurrency request to outside
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x401a28]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x401a28]
The text was updated successfully, but these errors were encountered: