From 2f65d8f22b5e70faed4a8e5044f7ce502e5f44bb Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Thu, 14 Dec 2023 09:40:17 +0000 Subject: [PATCH] fix bug Signed-off-by: Billy Zha --- cmd/oras/internal/meta/pull.go | 2 +- cmd/oras/internal/meta/type.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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, } }