From cd2f2b0af60f27aff9e7074a1ea523549c2ff47f Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Thu, 21 Oct 2021 19:46:50 +0900 Subject: [PATCH] client: expose (*image).platform Expose (*image).platform as Image.Platform() . Signed-off-by: Akihiro Suda --- image.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/image.go b/image.go index f35f0edca..5bcf4fed6 100644 --- a/image.go +++ b/image.go @@ -61,6 +61,8 @@ type Image interface { ContentStore() content.Store // Metadata returns the underlying image metadata Metadata() images.Image + // Platform returns the platform match comparer. Can be nil. + Platform() platforms.MatchComparer } type usageOptions struct { @@ -448,3 +450,7 @@ func (i *image) checkSnapshotterSupport(ctx context.Context, snapshotterName str func (i *image) ContentStore() content.Store { return i.client.ContentStore() } + +func (i *image) Platform() platforms.MatchComparer { + return i.platform +}