MCPcopy Create free account
hub / github.com/containerd/nerdctl / Current

Function Current

pkg/consoleutil/consoleutil.go:28–35  ·  view source on GitHub ↗

Current is from https://github.com/containerd/console/blob/v1.0.4/console.go#L68-L81 adapted so that it does not panic

()

Source from the content-addressed store, hash-verified

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
28func 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
38type resizer interface {

Callers 5

StartFunction · 0.92
AttachFunction · 0.92
execActionWithContainerFunction · 0.92
generateExecProcessSpecFunction · 0.92
runActionFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…