title: Convert byte slice to io.Reader
body: <p>In my project, I have a byte slice from a request's response.</p>
  
  <pre><code>defer resp.Body.Close()
  if resp.StatusCode != http.StatusOK {
      log.Println("StatusCode为" + strconv.Itoa(resp.StatusCode))
      return
  }
  
  respByte, err := ioutil.ReadAll(resp.Body)
  if err != nil {
  log.Println("fail to read response data")
      return
  }
  </code></pre>
  
  <p>This works, but if I want to get the response's body for <code>io.Reader</code>, how do I convert? I tried the newreader/writer but wasn't successful.</p>