From a27acd62b39e37145e209e4275d40fb4121d2f2f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 11 Apr 2023 20:23:11 +0200 Subject: [PATCH] cli/command/container/create: pullImage() remove intermediate vars Signed-off-by: Sebastiaan van Stijn --- cli/command/container/create.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cli/command/container/create.go b/cli/command/container/create.go index 1a48c69f15..05ac2fe0e0 100644 --- a/cli/command/container/create.go +++ b/cli/command/container/create.go @@ -131,12 +131,10 @@ func pullImage(ctx context.Context, dockerCli command.Cli, image string, platfor return err } - options := types.ImageCreateOptions{ + responseBody, err := dockerCli.Client().ImageCreate(ctx, image, types.ImageCreateOptions{ RegistryAuth: encodedAuth, Platform: platform, - } - - responseBody, err := dockerCli.Client().ImageCreate(ctx, image, options) + }) if err != nil { return err }