Current is from https://github.com/containerd/console/blob/v1.0.4/console.go#L68-L81 adapted so that it does not panic
()
| 26 | // Current is from https://github.com/containerd/console/blob/v1.0.4/console.go#L68-L81 |
| 27 | // adapted so that it does not panic |
| 28 | func Current() (c console.Console, err error) { |
| 29 | for _, s := range []*os.File{os.Stderr, os.Stdout, os.Stdin} { |
| 30 | if c, err = console.ConsoleFromFile(s); err == nil { |
| 31 | return c, nil |
| 32 | } |
| 33 | } |
| 34 | return nil, console.ErrNotAConsole |
| 35 | } |
| 36 | |
| 37 | // resizer is from https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/tasks/tasks.go#L25-L27 |
| 38 | type resizer interface { |
no outgoing calls
no test coverage detected
searching dependent graphs…