From 0c8dea9de8dffa2e2cc252cdab7112a3664b3a09 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 2 Nov 2021 23:39:16 -0700 Subject: [PATCH] go fmt --- weed/filer/filechunks_read.go | 2 +- weed/filer/filechunks_read_test.go | 8 ++++---- weed/filer/filer_delete_entry.go | 2 +- weed/filer/redis2/universal_redis_store.go | 4 ++-- weed/filesys/dir_rename.go | 3 +-- weed/server/filer_grpc_server_rename.go | 2 +- weed/server/master_server_cluster.go | 2 +- weed/server/volume_grpc_copy.go | 2 +- weed/server/volume_grpc_vacuum.go | 2 +- weed/storage/backend/s3_backend/s3_upload.go | 8 ++++---- 10 files changed, 17 insertions(+), 18 deletions(-) diff --git a/weed/filer/filechunks_read.go b/weed/filer/filechunks_read.go index 742f050be..33ee6d138 100644 --- a/weed/filer/filechunks_read.go +++ b/weed/filer/filechunks_read.go @@ -40,7 +40,7 @@ func readResolvedChunks(chunks []*filer_pb.FileChunk) (visibles []VisibleInterva for _, point := range points { if point.isStart { if len(queue) > 0 { - lastIndex := len(queue) -1 + lastIndex := len(queue) - 1 lastPoint := queue[lastIndex] if point.x != prevX && lastPoint.ts < point.ts { visibles = addToVisibles(visibles, prevX, lastPoint, point) diff --git a/weed/filer/filechunks_read_test.go b/weed/filer/filechunks_read_test.go index ff0cd9f4b..e70c66e6f 100644 --- a/weed/filer/filechunks_read_test.go +++ b/weed/filer/filechunks_read_test.go @@ -52,7 +52,7 @@ func TestReadResolvedChunks(t *testing.T) { func TestRandomizedReadResolvedChunks(t *testing.T) { - var limit int64 = 1024*1024 + var limit int64 = 1024 * 1024 array := make([]int64, limit) var chunks []*filer_pb.FileChunk for ts := int64(0); ts < 1024; ts++ { @@ -75,7 +75,7 @@ func TestRandomizedReadResolvedChunks(t *testing.T) { visibles := readResolvedChunks(chunks) for _, visible := range visibles { - for i := visible.start; i