resizeTty is to resize the tty with cli out's tty size
(ctx context.Context, cli command.Cli, id string, isExec bool)
| 50 | |
| 51 | // resizeTty is to resize the tty with cli out's tty size |
| 52 | func resizeTty(ctx context.Context, cli command.Cli, id string, isExec bool) error { |
| 53 | height, width := cli.Out().GetTtySize() |
| 54 | return resizeTTYTo(ctx, cli.Client(), id, height, width, isExec) |
| 55 | } |
| 56 | |
| 57 | // initTtySize is to init the TTYs size to the same as the window, if there is an error, it will retry 10 times. |
| 58 | func initTtySize(ctx context.Context, cli command.Cli, id string, isExec bool, resizeTtyFunc func(ctx context.Context, cli command.Cli, id string, isExec bool) error) { |
no test coverage detected
searching dependent graphs…