title: Do we need to close the response object if an error occurs while calling http.Get(url)?
body: <p>In the following code is it also necessary to close the response body in the error case:</p>
  
  <pre><code>res, err := http.Get(url)
  
  if err != nil {
      log.Printf("Error: %s\n", err)
  }
  
  defer res.Body.Close()
  </code></pre>