client: rename ImageRemoveResult.Deleted to ImageRemoveResult.Items

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-24 11:41:50 +02:00
parent 8222a3f1d9
commit c246639baa
10 changed files with 19 additions and 17 deletions

View File

@@ -35,5 +35,5 @@ func (cli *Client) ImageRemove(ctx context.Context, imageID string, options Imag
var dels []image.DeleteResponse
err = json.NewDecoder(resp.Body).Decode(&dels)
return ImageRemoveResult{Deleted: dels}, err
return ImageRemoveResult{Items: dels}, err
}

View File

@@ -14,5 +14,5 @@ type ImageRemoveOptions struct {
// ImageRemoveResult holds the delete responses returned by the daemon.
type ImageRemoveResult struct {
Deleted []image.DeleteResponse
Items []image.DeleteResponse
}

View File

@@ -91,8 +91,8 @@ func TestImageRemove(t *testing.T) {
opts.Platforms = []ocispec.Platform{*removeCase.platform}
}
imageDeletes, err := client.ImageRemove(context.Background(), "image_id", opts)
res, err := client.ImageRemove(context.Background(), "image_id", opts)
assert.NilError(t, err)
assert.Check(t, is.Len(imageDeletes.Deleted, 2))
assert.Check(t, is.Len(res.Items, 2))
}
}