diff --git a/cli/command/image/client_test.go b/cli/command/image/client_test.go index afae0b735d..96e612f252 100644 --- a/cli/command/image/client_test.go +++ b/cli/command/image/client_test.go @@ -91,7 +91,7 @@ func (cli *fakeClient) ImageList(ctx context.Context, options types.ImageListOpt if cli.imageListFunc != nil { return cli.imageListFunc(options) } - return []types.ImageSummary{{}}, nil + return []types.ImageSummary{}, nil } func (cli *fakeClient) ImageInspectWithRaw(_ context.Context, image string) (types.ImageInspect, []byte, error) { diff --git a/cli/command/image/list_test.go b/cli/command/image/list_test.go index 67d87a2d35..fb2227b807 100644 --- a/cli/command/image/list_test.go +++ b/cli/command/image/list_test.go @@ -30,7 +30,7 @@ func TestNewImagesCommandErrors(t *testing.T) { name: "failed-list", expectedError: "something went wrong", imageListFunc: func(options types.ImageListOptions) ([]types.ImageSummary, error) { - return []types.ImageSummary{{}}, errors.Errorf("something went wrong") + return []types.ImageSummary{}, errors.Errorf("something went wrong") }, }, } @@ -66,7 +66,7 @@ func TestNewImagesCommandSuccess(t *testing.T) { args: []string{"image"}, imageListFunc: func(options types.ImageListOptions) ([]types.ImageSummary, error) { assert.Check(t, is.Equal("image", options.Filters.Get("reference")[0])) - return []types.ImageSummary{{}}, nil + return []types.ImageSummary{}, nil }, }, { @@ -74,7 +74,7 @@ func TestNewImagesCommandSuccess(t *testing.T) { args: []string{"--filter", "name=value"}, imageListFunc: func(options types.ImageListOptions) ([]types.ImageSummary, error) { assert.Check(t, is.Equal("value", options.Filters.Get("name")[0])) - return []types.ImageSummary{{}}, nil + return []types.ImageSummary{}, nil }, }, }