aboutsummaryrefslogtreecommitdiff
path: root/go/storage/crc.go
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2016-04-10 00:24:22 -0700
committerchrislusf <chris.lu@gmail.com>2016-04-10 00:24:22 -0700
commitb39c384d6dfa63133990a1e190525ef3133f1530 (patch)
treed39b3ce93533f57ea8992ef782289d9ce58a3804 /go/storage/crc.go
parent113392bce88fbb2f3191ff1dfe8d8675c9c8b119 (diff)
downloadseaweedfs-b39c384d6dfa63133990a1e190525ef3133f1530.tar.xz
seaweedfs-b39c384d6dfa63133990a1e190525ef3133f1530.zip
Revert "Merge pull request #284 from thinxer/binary"
This reverts commit 3523ad523929870aa8d4a7741ee8e152cfd40489, reversing changes made to 5d100994b1b9c6679113c8dd73f97aff85397f02.
Diffstat (limited to 'go/storage/crc.go')
-rw-r--r--go/storage/crc.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/go/storage/crc.go b/go/storage/crc.go
index 3150b786c..21e384854 100644
--- a/go/storage/crc.go
+++ b/go/storage/crc.go
@@ -1,10 +1,10 @@
package storage
import (
- "encoding/binary"
"fmt"
-
"github.com/klauspost/crc32"
+
+ "github.com/chrislusf/seaweedfs/go/util"
)
var table = crc32.MakeTable(crc32.Castagnoli)
@@ -25,6 +25,6 @@ func (c CRC) Value() uint32 {
func (n *Needle) Etag() string {
bits := make([]byte, 4)
- binary.BigEndian.PutUint32(bits, uint32(n.Checksum))
+ util.Uint32toBytes(bits, uint32(n.Checksum))
return fmt.Sprintf("\"%x\"", bits)
}