forked from TrueCloudLab/frostfs-node
[#1671] Use slices.Delete()
where possible
gopatch is missing for this one, because https://github.com/uber-go/gopatch/issues/179 Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
155d3ddb6e
commit
460e5cbccf
7 changed files with 15 additions and 8 deletions
|
@ -3,6 +3,7 @@ package util
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"slices"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/netmap"
|
||||
|
@ -93,7 +94,7 @@ func (p *remotePlacement) BuildPlacement(ctx context.Context, cnr cid.ID, obj *o
|
|||
}
|
||||
|
||||
if p.netmapKeys.IsLocalKey(vs[i][j].PublicKey()) {
|
||||
vs[i] = append(vs[i][:j], vs[i][j+1:]...)
|
||||
vs[i] = slices.Delete(vs[i], j, j+1)
|
||||
j--
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue