Copy annotations around where necessary

Make sure that the newly added annotations are copied around appropriately.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger
2019-03-06 12:22:56 -05:00
parent c6703d4c76
commit 0b711d616a
8 changed files with 50 additions and 37 deletions

View File

@@ -137,16 +137,18 @@ func imagesFromProto(imagespb []imagesapi.Image) []images.Image {
func descFromProto(desc *types.Descriptor) ocispec.Descriptor {
return ocispec.Descriptor{
MediaType: desc.MediaType,
Size: desc.Size_,
Digest: desc.Digest,
MediaType: desc.MediaType,
Size: desc.Size_,
Digest: desc.Digest,
Annotations: desc.Annotations,
}
}
func descToProto(desc *ocispec.Descriptor) types.Descriptor {
return types.Descriptor{
MediaType: desc.MediaType,
Size_: desc.Size,
Digest: desc.Digest,
MediaType: desc.MediaType,
Size_: desc.Size,
Digest: desc.Digest,
Annotations: desc.Annotations,
}
}