mirror of
https://github.com/containers/skopeo.git
synced 2025-09-06 09:12:25 +00:00
fix(deps): update module github.com/containers/image/v5 to v5.33.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
15f69ac611
commit
fa1762f52b
15
vendor/github.com/containers/storage/utils.go
generated
vendored
15
vendor/github.com/containers/storage/utils.go
generated
vendored
@@ -2,6 +2,7 @@ package storage
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
|
||||
"github.com/containers/storage/types"
|
||||
)
|
||||
@@ -41,22 +42,12 @@ func applyNameOperation(oldNames []string, opParameters []string, op updateNameO
|
||||
// remove given names from old names
|
||||
result = make([]string, 0, len(oldNames))
|
||||
for _, name := range oldNames {
|
||||
// only keep names in final result which do not intersect with input names
|
||||
// basically `result = oldNames - opParameters`
|
||||
nameShouldBeRemoved := false
|
||||
for _, opName := range opParameters {
|
||||
if name == opName {
|
||||
nameShouldBeRemoved = true
|
||||
}
|
||||
}
|
||||
if !nameShouldBeRemoved {
|
||||
if !slices.Contains(opParameters, name) {
|
||||
result = append(result, name)
|
||||
}
|
||||
}
|
||||
case addNames:
|
||||
result = make([]string, 0, len(opParameters)+len(oldNames))
|
||||
result = append(result, opParameters...)
|
||||
result = append(result, oldNames...)
|
||||
result = slices.Concat(opParameters, oldNames)
|
||||
default:
|
||||
return result, errInvalidUpdateNameOperation
|
||||
}
|
||||
|
Reference in New Issue
Block a user