replace util/bytes.go with binary.BigEndian

This commit is contained in:
Jianfei Wang
2016-04-06 17:03:32 +08:00
committed by Jianfei Wang
parent f0cc264757
commit 18254d9aae
11 changed files with 78 additions and 117 deletions

View File

@@ -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)
}