fix: use switch statement for staticcheck QF1003 compliance

This commit is contained in:
erio
2026-02-10 03:59:39 +08:00
parent 662625a091
commit 05f5a8b61d

View File

@@ -379,9 +379,10 @@ func (s *GatewayService) TempUnscheduleRetryableError(ctx context.Context, accou
return return
} }
// 根据状态码选择封禁策略 // 根据状态码选择封禁策略
if failoverErr.StatusCode == http.StatusBadRequest { switch failoverErr.StatusCode {
case http.StatusBadRequest:
tempUnscheduleGoogleConfigError(ctx, s.accountRepo, accountID, "[handler]") tempUnscheduleGoogleConfigError(ctx, s.accountRepo, accountID, "[handler]")
} else if failoverErr.StatusCode == http.StatusBadGateway { case http.StatusBadGateway:
tempUnscheduleEmptyResponse(ctx, s.accountRepo, accountID, "[handler]") tempUnscheduleEmptyResponse(ctx, s.accountRepo, accountID, "[handler]")
} }
} }