Reduce the number of IO constructors
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
@@ -42,9 +42,9 @@ func HandleConsoleResize(ctx gocontext.Context, task resizer, con console.Consol
|
||||
|
||||
// NewTask creates a new task
|
||||
func NewTask(ctx gocontext.Context, client *containerd.Client, container containerd.Container, _ string, tty, nullIO bool) (containerd.Task, error) {
|
||||
ioCreator := cio.Stdio
|
||||
ioCreator := cio.NewCreator(cio.WithStdio)
|
||||
if tty {
|
||||
ioCreator = cio.StdioTerminal
|
||||
ioCreator = cio.NewCreator(cio.WithStdio, cio.WithTerminal)
|
||||
}
|
||||
if nullIO {
|
||||
if tty {
|
||||
|
Reference in New Issue
Block a user