gorequest icon indicating copy to clipboard operation
gorequest copied to clipboard

.Query() silently fails on *struct

Open pkopac opened this issue 9 years ago • 0 comments

Hi!

Try passing a pointer to struct to .Query. It won't do anything and it won't fail anything.

I'm circumventing by dereferencing everything, but it is very easy to forget it and then be surprised ;)

Please fix by dereferencing if pointer and not nil. A propos passing structs by pointer rather than value is a recommended Go pattern.

Thank you!

pkopac avatar Feb 10 '17 11:02 pkopac