diff --git a/cmd/oras/internal/meta/pull.go b/cmd/oras/internal/meta/pull.go index f4a91374f..7b28ba29a 100644 --- a/cmd/oras/internal/meta/pull.go +++ b/cmd/oras/internal/meta/pull.go @@ -48,7 +48,7 @@ type pull struct { func NewPull(digestReference string, files []File) pull { return pull{ DigestReference: DigestReference{ - Reference: digestReference, + Ref: digestReference, }, Files: files, } diff --git a/cmd/oras/internal/meta/type.go b/cmd/oras/internal/meta/type.go index 58262208e..c2999d2b7 100644 --- a/cmd/oras/internal/meta/type.go +++ b/cmd/oras/internal/meta/type.go @@ -22,13 +22,13 @@ import ( // DigestReference is a reference to an artifact with digest. type DigestReference struct { - Reference string `json:"Ref"` + Ref string `json:"Ref"` } // ToDigestReference converts a name and digest to a digest reference. func ToDigestReference(name string, digest string) DigestReference { return DigestReference{ - Reference: name + "@" + digest, + Ref: name + "@" + digest, } }