From 8a2d52975994df381fdb4869dcce5e99a77cb2ed Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 23 Dec 2019 12:48:53 -0800 Subject: [PATCH] go fmt --- weed/filesys/dir.go | 6 +++--- weed/server/volume_grpc_erasure_coding.go | 2 +- weed/shell/command_fs_du.go | 1 - weed/storage/needle_map_sorted_file.go | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index ae6623e07..7b24a1ec5 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -14,9 +14,9 @@ import ( ) type Dir struct { - Path string - wfs *WFS - entry *filer_pb.Entry + Path string + wfs *WFS + entry *filer_pb.Entry } var _ = fs.Node(&Dir{}) diff --git a/weed/server/volume_grpc_erasure_coding.go b/weed/server/volume_grpc_erasure_coding.go index 8626cf344..777801796 100644 --- a/weed/server/volume_grpc_erasure_coding.go +++ b/weed/server/volume_grpc_erasure_coding.go @@ -168,7 +168,7 @@ func (vs *VolumeServer) VolumeEcShardsDelete(ctx context.Context, req *volume_se continue } for _, fileInfo := range fileInfos { - if fileInfo.Name() == bName+".ecx" || fileInfo.Name() == bName+".ecj"{ + if fileInfo.Name() == bName+".ecx" || fileInfo.Name() == bName+".ecj" { hasEcxFile = true continue } diff --git a/weed/shell/command_fs_du.go b/weed/shell/command_fs_du.go index b6e767f17..1d7d79686 100644 --- a/weed/shell/command_fs_du.go +++ b/weed/shell/command_fs_du.go @@ -45,7 +45,6 @@ func (c *commandFsDu) Do(args []string, commandEnv *CommandEnv, writer io.Writer path = path + "/" } - var blockCount, byteCount uint64 dir, name := filer2.FullPath(path).DirAndName() blockCount, byteCount, err = duTraverseDirectory(ctx, writer, commandEnv.getFilerClient(filerServer, filerPort), dir, name) diff --git a/weed/storage/needle_map_sorted_file.go b/weed/storage/needle_map_sorted_file.go index 6b3d9c449..83290796f 100644 --- a/weed/storage/needle_map_sorted_file.go +++ b/weed/storage/needle_map_sorted_file.go @@ -19,7 +19,7 @@ type SortedFileNeedleMap struct { func NewSortedFileNeedleMap(baseFileName string, indexFile *os.File) (m *SortedFileNeedleMap, err error) { m = &SortedFileNeedleMap{baseFileName: baseFileName} m.indexFile = indexFile - fileName := baseFileName+".sdb" + fileName := baseFileName + ".sdb" if !isSortedFileFresh(fileName, indexFile) { glog.V(0).Infof("Start to Generate %s from %s", fileName, indexFile.Name()) erasure_coding.WriteSortedFileFromIdx(baseFileName, ".sdb")