Browse Source

go fmt

pull/1167/head
Chris Lu 5 years ago
parent
commit
8a2d529759
  1. 6
      weed/filesys/dir.go
  2. 2
      weed/server/volume_grpc_erasure_coding.go
  3. 1
      weed/shell/command_fs_du.go
  4. 2
      weed/storage/needle_map_sorted_file.go

6
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{})

2
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
}

1
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)

2
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")

Loading…
Cancel
Save