From d1fd483548a51586513b782ec0d864fc623b2686 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 16 Jun 2013 20:56:58 -0700 Subject: [PATCH] camput: remove Go 1.0 workaround. Now that we rely on Go 1.1, we no longer need to workaround https://code.google.com/p/go/issues/detail?id=4589 Change-Id: Ib6631679e7f9bcea82ef96df0f50d9ecace31aa3 --- cmd/camput/files.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/camput/files.go b/cmd/camput/files.go index 8c6352bc5..98727da4b 100644 --- a/cmd/camput/files.go +++ b/cmd/camput/files.go @@ -453,11 +453,7 @@ func (up *Uploader) wholeFileDigest(fullPath string) (*blobref.BlobRef, error) { } defer file.Close() td := &trackDigestReader{r: file} - // Warning: the struct in the following line exists to hide - // ioutil.Discard's ReadFrom from io.Copy, since ReadFrom uses - // an intentionally-racy buffer that's passed to the reader, - // which was causing SHA-1 calculation corruption. - _, err = io.Copy(struct{ io.Writer }{ioutil.Discard}, td) + _, err = io.Copy(ioutil.Discard, td) atomic.AddInt64(&atomicDigestOps, 1) if err != nil { return nil, err