From 1328bb3381e99ab4402cd78dfe71d878510f907a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 3 Feb 2024 17:54:23 +0100 Subject: [PATCH] cli/command/images: runImages: inline intermediate var Signed-off-by: Sebastiaan van Stijn --- cli/command/image/list.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cli/command/image/list.go b/cli/command/image/list.go index 887ca9c9a4..b0df7aa2a1 100644 --- a/cli/command/image/list.go +++ b/cli/command/image/list.go @@ -68,12 +68,10 @@ func runImages(ctx context.Context, dockerCli command.Cli, options imagesOptions filters.Add("reference", options.matchName) } - listOptions := image.ListOptions{ + images, err := dockerCli.Client().ImageList(ctx, image.ListOptions{ All: options.all, Filters: filters, - } - - images, err := dockerCli.Client().ImageList(ctx, listOptions) + }) if err != nil { return err }