diff --git a/client/client.go b/client/client.go index 2af39db316..b7ca2056f8 100644 --- a/client/client.go +++ b/client/client.go @@ -953,22 +953,10 @@ func (c *Client) GetSnapshotterSupportedPlatforms(ctx context.Context, snapshott } sn := resp.Plugins[0] - snPlatforms := toPlatforms(sn.Platforms) + snPlatforms := apitypes.OCIPlatformFromProto(sn.Platforms) return platforms.Any(snPlatforms...), nil } -func toPlatforms(pt []*apitypes.Platform) []ocispec.Platform { - platforms := make([]ocispec.Platform, len(pt)) - for i, p := range pt { - platforms[i] = ocispec.Platform{ - Architecture: p.Architecture, - OS: p.OS, - Variant: p.Variant, - } - } - return platforms -} - // GetSnapshotterCapabilities returns the capabilities of a snapshotter. func (c *Client) GetSnapshotterCapabilities(ctx context.Context, snapshotterName string) ([]string, error) { filters := []string{fmt.Sprintf("type==%s, id==%s", plugins.SnapshotPlugin, snapshotterName)}