From d475c89fccf1f020e6f552a5923a688a56e0f1ed Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 28 Jan 2021 15:23:46 -0800 Subject: [PATCH] go fmt --- weed/command/filer_sync.go | 30 ++++++++++++++-------------- weed/command/mount.go | 10 +++++----- weed/command/mount_std.go | 20 +++++++++---------- weed/filesys/dir.go | 2 +- weed/filesys/dirty_page.go | 18 ++++++++--------- weed/server/filer_server_handlers.go | 2 +- 6 files changed, 41 insertions(+), 41 deletions(-) diff --git a/weed/command/filer_sync.go b/weed/command/filer_sync.go index f4411b756..9a23fd731 100644 --- a/weed/command/filer_sync.go +++ b/weed/command/filer_sync.go @@ -20,21 +20,21 @@ import ( ) type SyncOptions struct { - isActivePassive *bool - filerA *string - filerB *string - aPath *string - bPath *string - aReplication *string - bReplication *string - aCollection *string - bCollection *string - aTtlSec *int - bTtlSec *int - aDebug *bool - bDebug *bool - aProxyByFiler *bool - bProxyByFiler *bool + isActivePassive *bool + filerA *string + filerB *string + aPath *string + bPath *string + aReplication *string + bReplication *string + aCollection *string + bCollection *string + aTtlSec *int + bTtlSec *int + aDebug *bool + bDebug *bool + aProxyByFiler *bool + bProxyByFiler *bool } var ( diff --git a/weed/command/mount.go b/weed/command/mount.go index febc80683..fce3eba22 100644 --- a/weed/command/mount.go +++ b/weed/command/mount.go @@ -6,11 +6,11 @@ import ( ) type MountOptions struct { - filer *string - filerMountRootPath *string - dir *string - dirAutoCreate *bool - collection *string + filer *string + filerMountRootPath *string + dir *string + dirAutoCreate *bool + collection *string replication *string ttlSec *int chunkSizeLimitMB *int diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 26c59a1c7..83ae870e6 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -169,16 +169,16 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { } seaweedFileSystem := filesys.NewSeaweedFileSystem(&filesys.Option{ - MountDirectory: dir, - FilerAddress: filer, - FilerGrpcAddress: filerGrpcAddress, - GrpcDialOption: grpcDialOption, - FilerMountRootPath: mountRoot, - Collection: *option.collection, - Replication: *option.replication, - TtlSec: int32(*option.ttlSec), - ChunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024, - ConcurrentWriters: *option.concurrentWriters, + MountDirectory: dir, + FilerAddress: filer, + FilerGrpcAddress: filerGrpcAddress, + GrpcDialOption: grpcDialOption, + FilerMountRootPath: mountRoot, + Collection: *option.collection, + Replication: *option.replication, + TtlSec: int32(*option.ttlSec), + ChunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024, + ConcurrentWriters: *option.concurrentWriters, CacheDir: *option.cacheDir, CacheSizeMB: *option.cacheSizeMB, DataCenter: *option.dataCenter, diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index e3d0057db..10a0a2b44 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -175,7 +175,7 @@ func (dir *Dir) doCreateEntry(name string, mode os.FileMode, uid, gid uint32, ex TtlSec: dir.wfs.option.TtlSec, }, }, - OExcl: exlusive, + OExcl: exlusive, Signatures: []int32{dir.wfs.signature}, } glog.V(1).Infof("create %s/%s", dir.FullPath(), name) diff --git a/weed/filesys/dirty_page.go b/weed/filesys/dirty_page.go index c4c206a05..f05a3a56a 100644 --- a/weed/filesys/dirty_page.go +++ b/weed/filesys/dirty_page.go @@ -11,19 +11,19 @@ import ( ) type ContinuousDirtyPages struct { - intervals *ContinuousIntervals - f *File - writeWaitGroup sync.WaitGroup - chunkAddLock sync.Mutex - lastErr error - collection string - replication string + intervals *ContinuousIntervals + f *File + writeWaitGroup sync.WaitGroup + chunkAddLock sync.Mutex + lastErr error + collection string + replication string } func newDirtyPages(file *File) *ContinuousDirtyPages { dirtyPages := &ContinuousDirtyPages{ - intervals: &ContinuousIntervals{}, - f: file, + intervals: &ContinuousIntervals{}, + f: file, } return dirtyPages } diff --git a/weed/server/filer_server_handlers.go b/weed/server/filer_server_handlers.go index fcafe3893..3bc0c5d0d 100644 --- a/weed/server/filer_server_handlers.go +++ b/weed/server/filer_server_handlers.go @@ -20,7 +20,7 @@ func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) { } if fileId != "" { stats.FilerRequestCounter.WithLabelValues("proxy").Inc() - fs.proxyToVolumeServer(w,r,fileId) + fs.proxyToVolumeServer(w, r, fileId) stats.FilerRequestHistogram.WithLabelValues("proxy").Observe(time.Since(start).Seconds()) return }