From a85ed3fe8fe8e6d5c69cf96836f6c80ce340ee8c Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 7 Jul 2022 22:27:24 -0700 Subject: [PATCH] minor --- weed/filer/filechunks.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.go index 5a600a188..4c732ddcd 100644 --- a/weed/filer/filechunks.go +++ b/weed/filer/filechunks.go @@ -52,11 +52,11 @@ func ETagChunks(chunks []*filer_pb.FileChunk) (etag string) { if len(chunks) == 1 { return fmt.Sprintf("%x", util.Base64Md5ToBytes(chunks[0].ETag)) } - md5_digests := [][]byte{} + var md5Digests [][]byte for _, c := range chunks { - md5_digests = append(md5_digests, util.Base64Md5ToBytes(c.ETag)) + md5Digests = append(md5Digests, util.Base64Md5ToBytes(c.ETag)) } - return fmt.Sprintf("%x-%d", util.Md5(bytes.Join(md5_digests, nil)), len(chunks)) + return fmt.Sprintf("%x-%d", util.Md5(bytes.Join(md5Digests, nil)), len(chunks)) } func CompactFileChunks(lookupFileIdFn wdclient.LookupFileIdFunctionType, chunks []*filer_pb.FileChunk) (compacted, garbage []*filer_pb.FileChunk) {