- 删除了对 gatewayGroupIps长度的检查,因为该检查可能是不必要的 - 简化了错误处理流程,提高了代码的可读性和维护性
@@ -148,10 +148,6 @@ func (s *allowAndDenyIpService) DeleteAllowAndDenyIps(ctx context.Context, req v
return err
}
- if len(gatewayGroupIps) == 0 {
- return fmt.Errorf("请先配置实例")
- }
-
ip, err := s.GetAllowAndDenyIp(ctx, int64(id))
if err != nil {