Skip to content

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 fmt

Chris Luf7c27cc81f4d
diff --git a/test/volume_server/framework/cluster_dual.go b/test/volume_server/framework/cluster_dual.go
index ffa28c75bb..144f268cf6 100644
--- a/test/volume_server/framework/cluster_dual.go
+++ b/test/volume_server/framework/cluster_dual.go
@@ -33,7 +33,7 @@ type DualVolumeCluster struct {
volumeGrpcPort1 int
volumePubPort1 int
- masterCmd *exec.Cmd
+ masterCmd *exec.Cmd
volumeCmd0 *exec.Cmd
volumeCmd1 *exec.Cmd
@@ -79,21 +79,21 @@ func StartDualVolumeCluster(t testing.TB, profile matrix.Profile) *DualVolumeClu
}
c := &DualVolumeCluster{
- testingTB: t,
- profile: profile,
- weedBinary: weedBinary,
- baseDir: baseDir,
- configDir: configDir,
- logsDir: logsDir,
- keepLogs: keepLogs,
- masterPort: masterPort,
- masterGrpcPort: masterGrpcPort,
- volumePort0: ports[0],
+ testingTB: t,
+ profile: profile,
+ weedBinary: weedBinary,
+ baseDir: baseDir,
+ configDir: configDir,
+ logsDir: logsDir,
+ keepLogs: keepLogs,
+ masterPort: masterPort,
+ masterGrpcPort: masterGrpcPort,
+ volumePort0: ports[0],
volumeGrpcPort0: ports[1],
- volumePubPort0: ports[0],
- volumePort1: ports[2],
+ volumePubPort0: ports[0],
+ volumePort1: ports[2],
volumeGrpcPort1: ports[3],
- volumePubPort1: ports[2],
+ volumePubPort1: ports[2],
}
if profile.SplitPublicPort {
c.volumePubPort0 = ports[4]
diff --git a/weed/iam/responses.go b/weed/iam/responses.go
index 1deb7b36c2..c84d49e2b2 100644
--- a/weed/iam/responses.go
+++ b/weed/iam/responses.go
@@ -95,7 +95,7 @@ type ListPolicyVersionsResponse struct {
// GetPolicyVersionResponse is the response for GetPolicyVersion action.
type GetPolicyVersionResponse struct {
CommonResponse
- XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ GetPolicyVersionResponse"`
+ XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ GetPolicyVersionResponse"`
GetPolicyVersionResult struct {
PolicyVersion iam.PolicyVersion `xml:"PolicyVersion"`
} `xml:"GetPolicyVersionResult"`
diff --git a/weed/s3api/auth_credentials_subscribe_test.go b/weed/s3api/auth_credentials_subscribe_test.go
index 20046d4eca..7ee2365940 100644
--- a/weed/s3api/auth_credentials_subscribe_test.go
+++ b/weed/s3api/auth_credentials_subscribe_test.go
@@ -90,18 +90,18 @@ func newTestS3ApiServerWithMemoryIAM(t *testing.T, identities []*iam_pb.Identity
// Create a test IAM instance
iam := &IdentityAccessManagement{
- m: sync.RWMutex{},
- nameToIdentity: make(map[string]*Identity),
- accessKeyIdent: make(map[string]*Identity),
- identities: []*Identity{},
- policies: make(map[string]*iam_pb.Policy),
- accounts: make(map[string]*Account),
- emailAccount: make(map[string]*Account),
- hashes: make(map[string]*sync.Pool),
- hashCounters: make(map[string]*int32),
- isAuthEnabled: false,
- stopChan: make(chan struct{}),
- useStaticConfig: false,
+ m: sync.RWMutex{},
+ nameToIdentity: make(map[string]*Identity),
+ accessKeyIdent: make(map[string]*Identity),
+ identities: []*Identity{},
+ policies: make(map[string]*iam_pb.Policy),
+ accounts: make(map[string]*Account),
+ emailAccount: make(map[string]*Account),
+ hashes: make(map[string]*sync.Pool),
+ hashCounters: make(map[string]*int32),
+ isAuthEnabled: false,
+ stopChan: make(chan struct{}),
+ useStaticConfig: false,
credentialManager: cm,
}
diff --git a/weed/s3api/bucket_paths.go b/weed/s3api/bucket_paths.go
index 58c25d1964..f9bf715183 100644
--- a/weed/s3api/bucket_paths.go
+++ b/weed/s3api/bucket_paths.go
@@ -95,7 +95,7 @@ func (s3a *S3ApiServer) readTableLocationMappingFromDirectory(bucket string) (st
conflict := false
err := s3a.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
-stream, err := client.ListEntries(context.Background(), &filer_pb.ListEntriesRequest{
+ stream, err := client.ListEntries(context.Background(), &filer_pb.ListEntriesRequest{
Directory: mappingDir,
Limit: 4294967295, // math.MaxUint32
})
diff --git a/weed/s3api/s3_constants/extend_key.go b/weed/s3api/s3_constants/extend_key.go
index bb3d637d16..8e5aeade50 100644
--- a/weed/s3api/s3_constants/extend_key.go
+++ b/weed/s3api/s3_constants/extend_key.go
@@ -11,7 +11,7 @@ const (
ExtETagKey = "Seaweed-X-Amz-ETag"
ExtLatestVersionIdKey = "Seaweed-X-Amz-Latest-Version-Id"
ExtLatestVersionFileNameKey = "Seaweed-X-Amz-Latest-Version-File-Name"
- ExtAllowEmptyFolders = "Seaweed-X-Amz-Allow-Empty-Folders"
+ ExtAllowEmptyFolders = "Seaweed-X-Amz-Allow-Empty-Folders"
// Cached list metadata in .versions directory for single-scan efficiency
ExtLatestVersionSizeKey = "Seaweed-X-Amz-Latest-Version-Size"
ExtLatestVersionETagKey = "Seaweed-X-Amz-Latest-Version-ETag"