package console
import "github.com/containerd/console"
Index ¶
Variables ¶
var ( ErrNotAConsole = errors.New("provided file is not a console") ErrNotImplemented = errors.New("not implemented") )
Types ¶
type Console ¶
type Console interface {
File
// Resize resizes the console to the provided window size
Resize(WinSize) error
// ResizeFrom resizes the calling console to the size of the
// provided console
ResizeFrom(Console) error
// SetRaw sets the console in raw mode
SetRaw() error
// DisableEcho disables echo on the console
DisableEcho() error
// Reset restores the console to its original state
Reset() error
// Size returns the window size of the console
Size() (WinSize, error)
}
func ConsoleFromFile ¶
ConsoleFromFile returns a console using the provided file nolint:revive
func Current ¶
func Current() (c Console)
Current returns the current process' console
type File ¶
type File interface {
io.ReadWriteCloser
// Fd returns its file descriptor
Fd() uintptr
// Name returns its file name
Name() string
}
type WinSize ¶
type WinSize struct {
// Height of the console
Height uint16
// Width of the console
Width uint16
// contains filtered or unexported fields
}
WinSize specifies the window size of the console
Source Files ¶
- Version
- v1.0.5 (latest)
- Published
- May 20, 2025
- Platform
- windows/amd64
- Imports
- 5 packages
- Last checked
- 10 months ago –
Tools for package owners.