mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 14:10:25 +03:00
run gofumpt cleanup across code-base (#14015)
This commit is contained in:
@@ -118,7 +118,7 @@ func getXLDiskLoc(diskID string) (poolIdx, setIdx, diskIdx int) {
|
||||
// Trivial collisions are avoided, but this is by no means a strong hash.
|
||||
func hashDeterministicString(m map[string]string) uint64 {
|
||||
// Seed (random)
|
||||
var crc = uint64(0xc2b40bbac11a7295)
|
||||
crc := uint64(0xc2b40bbac11a7295)
|
||||
// Xor each value to make order independent
|
||||
for k, v := range m {
|
||||
// Separate key and value with an individual xor with a random number.
|
||||
@@ -131,7 +131,7 @@ func hashDeterministicString(m map[string]string) uint64 {
|
||||
// hashDeterministicBytes will return a deterministic (weak) hash for the map values.
|
||||
// Trivial collisions are avoided, but this is by no means a strong hash.
|
||||
func hashDeterministicBytes(m map[string][]byte) uint64 {
|
||||
var crc = uint64(0x1bbc7e1dde654743)
|
||||
crc := uint64(0x1bbc7e1dde654743)
|
||||
for k, v := range m {
|
||||
crc ^= (xxh3.HashString(k) ^ 0x4ee3bbaf7ab2506b) + (xxh3.Hash(v) ^ 0x8da4c8da66194257)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user