Hi All Using goroutines to do some load testing on a webserver.
I have some code like this, https://play.golang.org/p/e2_ecJN0l4 It works but when the server get overloaded it returns an RSP. I would like to gracefully catch that and put an appropriate status code such as 500. The exact error message I get is, "panic: runtime error: invalud memory address or nil pointer dereference" It shows it around the defer httpResp.Body.Close() Can you suggest a better way of doing this? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.