From 4d144be641304b8364730fa316759b073415fba0 Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Wed, 25 Sep 2024 13:36:14 +0800 Subject: [PATCH] refinement Signed-off-by: Xiaoxuan Wang --- cmd/oras/root/manifest/index/update.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/oras/root/manifest/index/update.go b/cmd/oras/root/manifest/index/update.go index 61c0c326f..de0c714fc 100644 --- a/cmd/oras/root/manifest/index/update.go +++ b/cmd/oras/root/manifest/index/update.go @@ -121,7 +121,7 @@ func updateIndex(cmd *cobra.Command, opts updateOptions) error { if err != nil { return err } - manifests, err := removeManifests(ctx, displayStatus, index.Manifests, target, opts) + manifests, err := removeManifests(displayStatus, index.Manifests, target, opts) if err != nil { return err } @@ -231,7 +231,7 @@ func mergeIndexes(ctx context.Context, handler status.ManifestIndexUpdateHandler return manifests, nil } -func removeManifests(ctx context.Context, handler status.ManifestIndexUpdateHandler, manifests []ocispec.Descriptor, target oras.ReadOnlyTarget, opts updateOptions) ([]ocispec.Descriptor, error) { +func removeManifests(handler status.ManifestIndexUpdateHandler, manifests []ocispec.Descriptor, target oras.ReadOnlyTarget, opts updateOptions) ([]ocispec.Descriptor, error) { // create a set of digests to speed up the remove digestToRemove := make(map[digest.Digest]bool) for _, manifestRef := range opts.removeArguments {