Skip to content

Commit 316b5f5

Browse files
committed
ociLayoutResolver.info: remove use of reference.SplitObject
We already have a `reference.Spec` and `reference.Spec.Digest()` does exactly this. In addition, buildkit was the only external consumer of the `reference.SplitObject` function, and it may be deprecated and removed for containerd 2.0. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 555979d commit 316b5f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/containerimage/ocilayout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (r *ociLayoutResolver) info(ctx context.Context, ref reference.Spec) (conte
105105
err := r.withCaller(ctx, func(ctx context.Context, caller session.Caller) error {
106106
store := sessioncontent.NewCallerStore(caller, "oci:"+r.store.StoreID)
107107

108-
_, dgst := reference.SplitObject(ref.Object)
108+
dgst := ref.Digest()
109109
if dgst == "" {
110110
return errors.Errorf("reference %q does not contain a digest", ref.String())
111111
}

0 commit comments

Comments
 (0)