camget: use bytes.NewReader instead of bytes.NewBuffer

Change-Id: If51c47f356460b32355836e67a1ce443c071b65c
This commit is contained in:
Brad Fitzpatrick 2013-01-02 09:20:35 -08:00
parent 6b7d73d757
commit 378b854479
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ func smartFetch(cl *client.Client, targ string, br *blobref.BlobRef) error {
}
defer f.Close()
body, _ := sniffer.Body()
r := io.MultiReader(bytes.NewBuffer(body), rc)
r := io.MultiReader(bytes.NewReader(body), rc)
_, err = io.Copy(f, r)
return err
}