cli/command/container: fix redefinition of the built-in function close (revive)

cli/command/container/run.go:176:3: redefines-builtin-id: redefinition of the built-in function close (revive)
            close, err := attachContainer(ctx, dockerCli, &errCh, config, createResponse.ID)
            ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-03-29 15:32:00 +02:00
parent a9fff59809
commit be97731f1a
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 2 deletions

View File

@ -173,11 +173,11 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
dockerCli.ConfigFile().DetachKeys = opts.detachKeys
}
close, err := attachContainer(ctx, dockerCli, &errCh, config, createResponse.ID)
closeFn, err := attachContainer(ctx, dockerCli, &errCh, config, createResponse.ID)
if err != nil {
return err
}
defer close()
defer closeFn()
}
statusChan := waitExitOrRemoved(ctx, dockerCli, createResponse.ID, copts.autoRemove)