SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
go fmt
Chris Lu7359193e974e
diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.goindex bae0eac5c6..c58b26dc2b 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.goindex f69339a14f..dd76577b03 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, newDirectorreturn fuse.EIO}-return nil}diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.goindex 3898f2c58b..2b526cc52d 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.goindex 5d7bf2ac37..2b6707f2ee 100644--- a/weed/s3api/filer_multipart.go+++ b/weed/s3api/filer_multipart.go@@ -71,7 +71,7 @@ func (s3a *S3ApiServer) completeMultipartUpload(input *s3.CompleteMultipartUploareturn 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.CompleteMultipartUploadirName = 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.goindex 92267a1543..888003e458 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 funfunc (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.goindex d1f830efb6..9e62807889 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 *Commafunc (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<retryCount+1;i++{+ for i := 0; i < retryCount+1; i++ {if err = c.fixOneUnderReplicatedVolume(commandEnv, writer, takeAction, volumeReplicas, vid, allLocations); err == nil {continue}diff --git a/weed/shell/command_volume_server_evacuate.go b/weed/shell/command_volume_server_evacuate.goindex fb9bf79c64..6e0c19ae14 100644--- a/weed/shell/command_volume_server_evacuate.go+++ b/weed/shell/command_volume_server_evacuate.go@@ -61,7 +61,7 @@ func (c *commandVolumeServerEvacuate) Do(args []string, commandEnv *CommandEnv,return fmt.Errorf("need to specify volume server by -node=<host>:<port>")}- 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.goindex 4742c2b7c4..c2158e7ebf 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 = 0m.idx = m.idx[:0]return d