diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.go index bae0eac5c..c58b26dc2 100644 --- a/weed/filer/filer_conf.go +++ b/weed/filer/filer_conf.go @@ -13,13 +13,13 @@ import ( ) const ( - DirectoryEtcRoot = "/etc" - DirectoryEtcSeaweedFS = "/etc/seaweedfs" - DirectoryEtcRemote = "/etc/remote" - FilerConfName = "filer.conf" - IamConfigDirecotry = "/etc/iam" - IamIdentityFile = "identity.json" - IamPoliciesFile = "policies.json" + DirectoryEtcRoot = "/etc" + DirectoryEtcSeaweedFS = "/etc/seaweedfs" + DirectoryEtcRemote = "/etc/remote" + FilerConfName = "filer.conf" + IamConfigDirecotry = "/etc/iam" + IamIdentityFile = "identity.json" + IamPoliciesFile = "policies.json" ) type FilerConf struct { diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index f69339a14..dd76577b0 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -63,7 +63,6 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector return fuse.EIO } - return nil } diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.go index 3898f2c58..2b526cc52 100644 --- a/weed/replication/sink/filersink/filer_sink.go +++ b/weed/replication/sink/filersink/filer_sink.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/chrislusf/seaweedfs/weed/pb" "github.com/chrislusf/seaweedfs/weed/wdclient" - "math" + "math" "google.golang.org/grpc" diff --git a/weed/s3api/filer_multipart.go b/weed/s3api/filer_multipart.go index 5d7bf2ac3..2b6707f2e 100644 --- a/weed/s3api/filer_multipart.go +++ b/weed/s3api/filer_multipart.go @@ -71,7 +71,7 @@ func (s3a *S3ApiServer) completeMultipartUpload(input *s3.CompleteMultipartUploa return nil, s3err.ErrNoSuchUpload } - pentry, err := s3a.getEntry(s3a.genUploadsFolder(*input.Bucket),*input.UploadId) + pentry, err := s3a.getEntry(s3a.genUploadsFolder(*input.Bucket), *input.UploadId) if err != nil { glog.Errorf("completeMultipartUpload %s %s error: %v", *input.Bucket, *input.UploadId, err) return nil, s3err.ErrNoSuchUpload @@ -112,11 +112,11 @@ func (s3a *S3ApiServer) completeMultipartUpload(input *s3.CompleteMultipartUploa dirName = dirName[:len(dirName)-1] } - err = s3a.mkFile(dirName, entryName, finalParts,func(entry *filer_pb.Entry) { + err = s3a.mkFile(dirName, entryName, finalParts, func(entry *filer_pb.Entry) { if entry.Extended == nil { entry.Extended = make(map[string][]byte) } - for k,v := range pentry.Extended{ + for k, v := range pentry.Extended { if k != "key" { entry.Extended[k] = v } diff --git a/weed/s3api/filer_util.go b/weed/s3api/filer_util.go index 92267a154..888003e45 100644 --- a/weed/s3api/filer_util.go +++ b/weed/s3api/filer_util.go @@ -17,7 +17,7 @@ func (s3a *S3ApiServer) mkdir(parentDirectoryPath string, dirName string, fn fun func (s3a *S3ApiServer) mkFile(parentDirectoryPath string, fileName string, chunks []*filer_pb.FileChunk, fn func(entry *filer_pb.Entry)) error { - return filer_pb.MkFile(s3a, parentDirectoryPath, fileName, chunks,fn) + return filer_pb.MkFile(s3a, parentDirectoryPath, fileName, chunks, fn) } diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go index d1f830efb..9e6280788 100644 --- a/weed/shell/command_volume_fix_replication.go +++ b/weed/shell/command_volume_fix_replication.go @@ -158,7 +158,7 @@ func (c *commandVolumeFixReplication) fixOverReplicatedVolumes(commandEnv *Comma func (c *commandVolumeFixReplication) fixUnderReplicatedVolumes(commandEnv *CommandEnv, writer io.Writer, takeAction bool, underReplicatedVolumeIds []uint32, volumeReplicas map[uint32][]*VolumeReplica, allLocations []location, retryCount int) (err error) { for _, vid := range underReplicatedVolumeIds { - for i:=0;i:") } - for i:=0;i<*retryCount+1;i++{ + for i := 0; i < *retryCount+1; i++ { if err = volumeServerEvacuate(commandEnv, *volumeServer, *skipNonMoveable, *applyChange, writer); err == nil { return nil } diff --git a/weed/util/log_buffer/log_buffer.go b/weed/util/log_buffer/log_buffer.go index 4742c2b7c..c2158e7eb 100644 --- a/weed/util/log_buffer/log_buffer.go +++ b/weed/util/log_buffer/log_buffer.go @@ -170,8 +170,8 @@ func (m *LogBuffer) copyToFlush() *dataToFlush { m.lastFlushTime = m.stopTime } m.buf = m.prevBuffers.SealBuffer(m.startTime, m.stopTime, m.buf, m.pos) - m.startTime = time.Unix(0,0) - m.stopTime = time.Unix(0,0) + m.startTime = time.Unix(0, 0) + m.stopTime = time.Unix(0, 0) m.pos = 0 m.idx = m.idx[:0] return d