replace util/bytes.go with binary.BigEndian
This commit is contained in:
committed by
Jianfei Wang
parent
f0cc264757
commit
18254d9aae
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user