Skip to content

Instantly share code, notes, and snippets.

@pocke
Last active August 29, 2015 14:11
Show Gist options
  • Save pocke/070b345b0ae5cc8d6968 to your computer and use it in GitHub Desktop.
Save pocke/070b345b0ae5cc8d6968 to your computer and use it in GitHub Desktop.
// io.Reader から一度読み込んで出力してもう一度io.Readerに戻す
var b bytes.Buffer
b.ReadFrom(resp.Body)
s := b.String()
fmt.Println(s)
r := strings.NewReader(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment