code: func ensureReaderClosed(stream io.ReadCloser) {
  	if stream == nil {
  		return
  	}
  	io.Copy(ioutil.Discard, stream)
  	stream.Close()
  }
docs: // As the name says,
  // blocks until the stream is empty, until we meet EOF