Skip to content

Commit

Permalink
Remove old debug from tarsum
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume J. Charmes committed Dec 26, 2013
1 parent efaf2ca commit 360078d
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions utils/tarsum.go
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -29,7 +20,6 @@ type TarSum struct {
bufTar *bytes.Buffer
bufGz *bytes.Buffer
h hash.Hash
h2 verboseHash
sums []string
finished bool
first bool
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 360078d

Please sign in to comment.