in the code snippet below which is inside a function, is "defer
resp.Body.Close() " in the appropriate position?
am i required to always do a resp.Body.Close()?
...
resp, err := client.Do(req)
log.Printf("resp: %+v\n", resp)
if resp.StatusCode != http.StatusOK {
return errors.NewHTTPError(resp.StatusCode)
}
....
defer resp.Body.Close()
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.