diff options
| author | Jianfei Wang <wjf@megvii.com> | 2016-04-06 17:03:32 +0800 |
|---|---|---|
| committer | Jianfei Wang <wjf@megvii.com> | 2016-04-06 17:08:52 +0800 |
| commit | 7bc10d46e333496b7de1d6e774b3e88b5a7d8ab8 (patch) | |
| tree | 84e82e18d98ed25a6863c0aafedd1fb19bf8701d /go/storage/crc.go | |
| parent | 6876bfa68524d4fc0a961f89dc29e53fbc654ea5 (diff) | |
| download | seaweedfs-7bc10d46e333496b7de1d6e774b3e88b5a7d8ab8.tar.xz seaweedfs-7bc10d46e333496b7de1d6e774b3e88b5a7d8ab8.zip | |
replace util/bytes.go with binary.BigEndian
Diffstat (limited to 'go/storage/crc.go')
| -rw-r--r-- | go/storage/crc.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/go/storage/crc.go b/go/storage/crc.go index 21e384854..3150b786c 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" + "github.com/klauspost/crc32" ) var table = crc32.MakeTable(crc32.Castagnoli) @@ -25,6 +25,6 @@ func (c CRC) Value() uint32 { func (n *Needle) Etag() string { bits := make([]byte, 4) - util.Uint32toBytes(bits, uint32(n.Checksum)) + binary.BigEndian.PutUint32(bits, uint32(n.Checksum)) return fmt.Sprintf("\"%x\"", bits) } |
