Golint fixes

This commit is contained in:
Harshavardhana
2015-03-25 13:23:07 -07:00
parent 9503a4df33
commit 2cbd15b690
9 changed files with 92 additions and 36 deletions

View File

@@ -98,10 +98,10 @@ func (d *digest) Write(p []byte) (nn int, err error) {
}
// Return checksum bytes
func (d0 *digest) Sum(in []byte) []byte {
func (d *digest) Sum(in []byte) []byte {
// Make a copy of d0 so that caller can keep writing and summing.
d := *d0
hash := d.checkSum()
d0 := *d
hash := d0.checkSum()
return append(in, hash[:]...)
}

View File

@@ -6,6 +6,7 @@ import (
"crypto/sha512"
)
// The size of a SHA512 checksum in bytes.
const (
Size = sha512.Size
)