1
0
mirror of https://github.com/moby/moby.git synced 2025-12-06 07:41:18 +03:00

Move attach command to cobra.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
Zhang Wei
2016-06-06 00:17:39 +08:00
parent 07a7c0632f
commit eceb8625a9
7 changed files with 139 additions and 121 deletions

View File

@@ -62,10 +62,12 @@ func (cli *DockerCli) RegistryAuthenticationPrivilegedFunc(index *registrytypes.
func (cli *DockerCli) resizeTty(ctx context.Context, id string, isExec bool) {
height, width := cli.GetTtySize()
cli.resizeTtyTo(ctx, id, height, width, isExec)
cli.ResizeTtyTo(ctx, id, height, width, isExec)
}
func (cli *DockerCli) resizeTtyTo(ctx context.Context, id string, height, width int, isExec bool) {
// ResizeTtyTo resizes tty to specific height and width
// TODO: this can be unexported again once all container related commands move to package container
func (cli *DockerCli) ResizeTtyTo(ctx context.Context, id string, height, width int, isExec bool) {
if height == 0 && width == 0 {
return
}