Skip to content

Commit 0c5adb2

Browse files
committed
cli/command/container: attach: rename var that collided with import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 1db37a8 commit 0c5adb2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

cli/command/container/attach.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ func NewAttachCommand(dockerCli command.Cli) *cobra.Command {
7272

7373
func runAttach(dockerCli command.Cli, opts *attachOptions) error {
7474
ctx := context.Background()
75-
client := dockerCli.Client()
75+
apiClient := dockerCli.Client()
7676

7777
// request channel to wait for client
78-
resultC, errC := client.ContainerWait(ctx, opts.container, "")
78+
resultC, errC := apiClient.ContainerWait(ctx, opts.container, "")
7979

80-
c, err := inspectContainerAndCheckState(ctx, client, opts.container)
80+
c, err := inspectContainerAndCheckState(ctx, apiClient, opts.container)
8181
if err != nil {
8282
return err
8383
}
@@ -109,7 +109,7 @@ func runAttach(dockerCli command.Cli, opts *attachOptions) error {
109109
defer signal.StopCatch(sigc)
110110
}
111111

112-
resp, errAttach := client.ContainerAttach(ctx, opts.container, options)
112+
resp, errAttach := apiClient.ContainerAttach(ctx, opts.container, options)
113113
if errAttach != nil {
114114
return errAttach
115115
}
@@ -123,7 +123,7 @@ func runAttach(dockerCli command.Cli, opts *attachOptions) error {
123123
// the container and not exit.
124124
//
125125
// Recheck the container's state to avoid attach block.
126-
_, err = inspectContainerAndCheckState(ctx, client, opts.container)
126+
_, err = inspectContainerAndCheckState(ctx, apiClient, opts.container)
127127
if err != nil {
128128
return err
129129
}

0 commit comments

Comments
 (0)