From dffe038efa58ca7907753c4eab07f65d00e5a9a6 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 28 Jan 2026 14:34:07 -0800 Subject: [PATCH] go fmt --- weed/cluster/lock_client.go | 22 +++++++++++----------- weed/s3api/cors/middleware_test.go | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/weed/cluster/lock_client.go b/weed/cluster/lock_client.go index 241c583ea..5e635eeae 100644 --- a/weed/cluster/lock_client.go +++ b/weed/cluster/lock_client.go @@ -32,17 +32,17 @@ func NewLockClient(grpcDialOption grpc.DialOption, seedFiler pb.ServerAddress) * } type LiveLock struct { - key string - renewToken string - expireAtNs int64 - hostFiler pb.ServerAddress - cancelCh chan struct{} - grpcDialOption grpc.DialOption - isLocked int32 // 0 = unlocked, 1 = locked; use atomic operations - self string - lc *LockClient - owner string - lockTTL time.Duration + key string + renewToken string + expireAtNs int64 + hostFiler pb.ServerAddress + cancelCh chan struct{} + grpcDialOption grpc.DialOption + isLocked int32 // 0 = unlocked, 1 = locked; use atomic operations + self string + lc *LockClient + owner string + lockTTL time.Duration consecutiveFailures int // Track connection failures to trigger fallback } diff --git a/weed/s3api/cors/middleware_test.go b/weed/s3api/cors/middleware_test.go index 59d00f447..002e90c69 100644 --- a/weed/s3api/cors/middleware_test.go +++ b/weed/s3api/cors/middleware_test.go @@ -453,7 +453,7 @@ func TestMiddlewareVaryHeader(t *testing.T) { t.Run(tt.name, func(t *testing.T) { // Setup mocks bucketChecker := &mockBucketChecker{bucketExists: true} - + var errCode s3err.ErrorCode if tt.bucketConfig == nil { errCode = s3err.ErrNoSuchCORSConfiguration @@ -503,7 +503,7 @@ func TestMiddlewareVaryHeader(t *testing.T) { func TestHandleOptionsRequestVaryHeader(t *testing.T) { // Setup mocks bucketChecker := &mockBucketChecker{bucketExists: true} - + config := &CORSConfiguration{ CORSRules: []CORSRule{ { @@ -528,7 +528,7 @@ func TestHandleOptionsRequestVaryHeader(t *testing.T) { "bucket": "testbucket", "object": "testobject", }) - + // Set valid CORS headers req.Header.Set("Origin", "https://example.com") req.Header.Set("Access-Control-Request-Method", "GET")