mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
cleanup:use append other than for loop
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
This commit is contained in:
parent
10bea49c12
commit
8e9a896483
@ -225,9 +225,7 @@ func (r *reconciler) reconcileByAddressType(service *corev1.Service, pods []*cor
|
|||||||
// the corresponding endpoint slices for deletion.
|
// the corresponding endpoint slices for deletion.
|
||||||
for portMap, existingSlices := range existingSlicesByPortMap {
|
for portMap, existingSlices := range existingSlicesByPortMap {
|
||||||
if _, ok := desiredEndpointsByPortMap[portMap]; !ok {
|
if _, ok := desiredEndpointsByPortMap[portMap]; !ok {
|
||||||
for _, existingSlice := range existingSlices {
|
slicesToDelete = append(slicesToDelete, existingSlices...)
|
||||||
slicesToDelete = append(slicesToDelete, existingSlice)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user