mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-05-12 21:42:54 +00:00
fix: use safe type assertion for errcheck lint compliance
This commit is contained in:
@@ -162,7 +162,7 @@ func (p *AntigravityTokenProvider) GetAccessToken(ctx context.Context, account *
|
|||||||
func (p *AntigravityTokenProvider) tryFillProjectID(ctx context.Context, account *Account, accessToken string) {
|
func (p *AntigravityTokenProvider) tryFillProjectID(ctx context.Context, account *Account, accessToken string) {
|
||||||
// 冷却检查:60s 内不重复尝试
|
// 冷却检查:60s 内不重复尝试
|
||||||
if lastAttempt, ok := p.projectIDFillAttempts.Load(account.ID); ok {
|
if lastAttempt, ok := p.projectIDFillAttempts.Load(account.ID); ok {
|
||||||
if time.Since(lastAttempt.(time.Time)) < projectIDFillCooldown {
|
if t, ok := lastAttempt.(time.Time); ok && time.Since(t) < projectIDFillCooldown {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user