From 360078d7613e1939c6d2f949ccac14c6ab9d568e Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Thu, 26 Dec 2013 12:27:51 -0800 Subject: [PATCH] Remove old debug from tarsum --- utils/tarsum.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/utils/tarsum.go b/utils/tarsum.go index 9cba516a34..c441c25766 100644 --- a/utils/tarsum.go +++ b/utils/tarsum.go @@ -1,26 +1,17 @@ package utils import ( + "archive/tar" "bytes" "compress/gzip" "crypto/sha256" "encoding/hex" - "archive/tar" "hash" "io" "sort" "strconv" ) -type verboseHash struct { - hash.Hash -} - -func (h verboseHash) Write(buf []byte) (int, error) { - Debugf("--->%s<---", buf) - return h.Hash.Write(buf) -} - type TarSum struct { io.Reader tarR *tar.Reader @@ -29,7 +20,6 @@ type TarSum struct { bufTar *bytes.Buffer bufGz *bytes.Buffer h hash.Hash - h2 verboseHash sums []string finished bool first bool @@ -52,7 +42,6 @@ func (ts *TarSum) encodeHeader(h *tar.Header) error { // {"atime", strconv.Itoa(int(h.AccessTime.UTC().Unix()))}, // {"ctime", strconv.Itoa(int(h.ChangeTime.UTC().Unix()))}, } { - // Debugf("-->%s<-- -->%s<--", elem[0], elem[1]) if _, err := ts.h.Write([]byte(elem[0] + elem[1])); err != nil { return err } @@ -68,7 +57,6 @@ func (ts *TarSum) Read(buf []byte) (int, error) { ts.tarW = tar.NewWriter(ts.bufTar) ts.gz = gzip.NewWriter(ts.bufGz) ts.h = sha256.New() - // ts.h = verboseHash{sha256.New()} ts.h.Reset() ts.first = true }