mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-27 09:54:47 +08:00
fix: use switch statement for staticcheck QF1003 compliance
This commit is contained in:
@@ -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]")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user