c8d: ImageService.softImageDelete: rename var that collided with import

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-05-25 01:39:18 +02:00
parent df5deab20b
commit f17c9e4aeb
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -19,10 +19,10 @@ func (i *ImageService) softImageDelete(ctx context.Context, img containerdimages
// If the image already exists, persist it as dangling image
// but only if no other image has the same target.
digest := img.Target.Digest.String()
imgs, err := is.List(ctx, "target.digest=="+digest)
dgst := img.Target.Digest.String()
imgs, err := is.List(ctx, "target.digest=="+dgst)
if err != nil {
return errdefs.System(errors.Wrapf(err, "failed to check if there are images targeting digest %s", digest))
return errdefs.System(errors.Wrapf(err, "failed to check if there are images targeting digest %s", dgst))
}
// From this point explicitly ignore the passed context