mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
fix: use switch statement for staticcheck QF1003 compliance
This commit is contained in:
1 parent
662625a091
commit
05f5a8b61d
1 file changed
+3
-2
@@ -379,9 +379,10 @@ func (s *GatewayService) TempUnscheduleRetryableError(ctx context.Context, accou
|
||||
return
|
||||
}
|
||||
// 根据状态码选择封禁策略
|
||||
if failoverErr.StatusCode == http.StatusBadRequest {
|
||||
switch failoverErr.StatusCode {
|
||||
case http.StatusBadRequest:
|
||||
tempUnscheduleGoogleConfigError(ctx, s.accountRepo, accountID, "[handler]")
|
||||
} else if failoverErr.StatusCode == http.StatusBadGateway {
|
||||
case http.StatusBadGateway:
|
||||
tempUnscheduleEmptyResponse(ctx, s.accountRepo, accountID, "[handler]")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user