From 0c5adb2e984014317a6d1df405af9c33a56df456 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 8 Jun 2023 15:23:26 +0200 Subject: [PATCH] cli/command/container: attach: rename var that collided with import Signed-off-by: Sebastiaan van Stijn --- cli/command/container/attach.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/command/container/attach.go b/cli/command/container/attach.go index bd17696b80..ad8c04d04c 100644 --- a/cli/command/container/attach.go +++ b/cli/command/container/attach.go @@ -72,12 +72,12 @@ func NewAttachCommand(dockerCli command.Cli) *cobra.Command { func runAttach(dockerCli command.Cli, opts *attachOptions) error { ctx := context.Background() - client := dockerCli.Client() + apiClient := dockerCli.Client() // request channel to wait for client - resultC, errC := client.ContainerWait(ctx, opts.container, "") + resultC, errC := apiClient.ContainerWait(ctx, opts.container, "") - c, err := inspectContainerAndCheckState(ctx, client, opts.container) + c, err := inspectContainerAndCheckState(ctx, apiClient, opts.container) if err != nil { return err } @@ -109,7 +109,7 @@ func runAttach(dockerCli command.Cli, opts *attachOptions) error { defer signal.StopCatch(sigc) } - resp, errAttach := client.ContainerAttach(ctx, opts.container, options) + resp, errAttach := apiClient.ContainerAttach(ctx, opts.container, options) if errAttach != nil { return errAttach } @@ -123,7 +123,7 @@ func runAttach(dockerCli command.Cli, opts *attachOptions) error { // the container and not exit. // // Recheck the container's state to avoid attach block. - _, err = inspectContainerAndCheckState(ctx, client, opts.container) + _, err = inspectContainerAndCheckState(ctx, apiClient, opts.container) if err != nil { return err }