mirror of
https://github.com/vbatts/tar-split.git
synced 2024-11-26 09:45:39 +00:00
Remove redundant TeeReader
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
b5c23068bb
commit
e6df23162e
1 changed files with 1 additions and 3 deletions
|
@ -5,7 +5,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"hash/crc64"
|
"hash/crc64"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
@ -97,8 +96,7 @@ type bitBucketFilePutter struct {
|
||||||
|
|
||||||
func (bbfp *bitBucketFilePutter) Put(name string, r io.Reader) (int64, []byte, error) {
|
func (bbfp *bitBucketFilePutter) Put(name string, r io.Reader) (int64, []byte, error) {
|
||||||
c := crc64.New(CRCTable)
|
c := crc64.New(CRCTable)
|
||||||
tRdr := io.TeeReader(r, c)
|
i, err := io.Copy(c, r)
|
||||||
i, err := io.Copy(ioutil.Discard, tRdr)
|
|
||||||
return i, c.Sum(nil), err
|
return i, c.Sum(nil), err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue