From ccf6a921c7dc6c82615fbda55e530a69d4885e3f Mon Sep 17 00:00:00 2001 From: shaw Date: Tue, 3 Mar 2026 16:45:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20PR=20#723=20?= =?UTF-8?q?=E5=BC=95=E5=85=A5=E7=9A=84=20CI=20lint=20=E5=92=8C=20test=20?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - wire_gen_test.go: 补充 NewTokenRefreshService 缺失的 tempUnschedCache 参数 - config.go, token_refresh_service.go: 修复 gofmt 格式问题 --- backend/cmd/server/wire_gen_test.go | 1 + backend/internal/config/config.go | 2 +- backend/internal/service/token_refresh_service.go | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/cmd/server/wire_gen_test.go b/backend/cmd/server/wire_gen_test.go index bd2e7f90..373bfd88 100644 --- a/backend/cmd/server/wire_gen_test.go +++ b/backend/cmd/server/wire_gen_test.go @@ -37,6 +37,7 @@ func TestProvideCleanup_WithMinimalDependencies_NoPanic(t *testing.T) { nil, nil, cfg, + nil, ) accountExpirySvc := service.NewAccountExpiryService(nil, time.Second) subscriptionExpirySvc := service.NewSubscriptionExpiryService(nil, time.Second) diff --git a/backend/internal/config/config.go b/backend/internal/config/config.go index 14f2842f..cc81ce54 100644 --- a/backend/internal/config/config.go +++ b/backend/internal/config/config.go @@ -872,7 +872,7 @@ type DefaultConfig struct { } type RateLimitConfig struct { - OverloadCooldownMinutes int `mapstructure:"overload_cooldown_minutes"` // 529过载冷却时间(分钟) + OverloadCooldownMinutes int `mapstructure:"overload_cooldown_minutes"` // 529过载冷却时间(分钟) OAuth401CooldownMinutes int `mapstructure:"oauth_401_cooldown_minutes"` // OAuth 401临时不可调度冷却(分钟) } diff --git a/backend/internal/service/token_refresh_service.go b/backend/internal/service/token_refresh_service.go index f069bb5e..73035687 100644 --- a/backend/internal/service/token_refresh_service.go +++ b/backend/internal/service/token_refresh_service.go @@ -18,8 +18,8 @@ type TokenRefreshService struct { refreshers []TokenRefresher cfg *config.TokenRefreshConfig cacheInvalidator TokenCacheInvalidator - schedulerCache SchedulerCache // 用于同步更新调度器缓存,解决 token 刷新后缓存不一致问题 - tempUnschedCache TempUnschedCache // 用于清除 Redis 中的临时不可调度缓存 + schedulerCache SchedulerCache // 用于同步更新调度器缓存,解决 token 刷新后缓存不一致问题 + tempUnschedCache TempUnschedCache // 用于清除 Redis 中的临时不可调度缓存 stopCh chan struct{} wg sync.WaitGroup