From 0ea5c087ce8414e2fc6a0d470d316bac7fd1167b Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 15 Nov 2020 16:59:28 -0800 Subject: [PATCH] go fmt --- weed/filer/filer_conf.go | 7 +++---- weed/filesys/file.go | 2 +- weed/operation/assign_file_id.go | 1 - weed/pb/filer_pb/filer_pb_helper.go | 1 + weed/s3api/http/header.go | 2 +- weed/server/filer_server_handlers.go | 4 ++-- weed/server/filer_server_handlers_write.go | 6 +++--- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.go index 0a86192ec..b75fb5084 100644 --- a/weed/filer/filer_conf.go +++ b/weed/filer/filer_conf.go @@ -10,9 +10,8 @@ import ( "github.com/viant/ptrie" ) - const ( - DirectoryEtc = "/etc" + DirectoryEtc = "/etc" FilerConfName = "filer.conf" ) @@ -27,7 +26,7 @@ func NewFilerConf() (fc *FilerConf) { return fc } -func (fc *FilerConf) loadFromFiler(filer *Filer) (err error){ +func (fc *FilerConf) loadFromFiler(filer *Filer) (err error) { filerConfPath := util.NewFullPath(DirectoryEtc, FilerConfName) entry, err := filer.FindEntry(context.Background(), filerConfPath) if err != nil { @@ -79,7 +78,7 @@ var ( EmptyFilerConfPathConf = &filer_pb.FilerConf_PathConf{} ) -func (fc *FilerConf) MatchStorageRule(path string) (pathConf *filer_pb.FilerConf_PathConf){ +func (fc *FilerConf) MatchStorageRule(path string) (pathConf *filer_pb.FilerConf_PathConf) { fc.rules.MatchPrefix([]byte(path), func(key []byte, value interface{}) bool { pathConf = value.(*filer_pb.FilerConf_PathConf) return true diff --git a/weed/filesys/file.go b/weed/filesys/file.go index 9e1342370..3bffa156e 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -294,7 +294,7 @@ func (file *File) addChunks(chunks []*filer_pb.FileChunk) { // find the earliest incoming chunk newChunks := chunks earliestChunk := newChunks[0] - for i:=1;i