conpty
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package conpty implements support for Windows pseudo-consoles.
Index¶
Constants¶
This section is empty.
Variables¶
var (// ErrUnsupported is returned by NewPseudoConsole if the current Windows// build does not support this package's API.ErrUnsupported =errors.New("conpty unsupported on this version of Windows"))
Functions¶
This section is empty.
Types¶
typePseudoConsole¶
type PseudoConsole struct {// contains filtered or unexported fields}PseudoConsole encapsulates a Windows pseudo-console. Use NewPseudoConsoleto create a new instance.
funcNewPseudoConsole¶
func NewPseudoConsole(sizewindows.Coord) (pty *PseudoConsole, errerror)
NewPseudoConsole creates a new PseudoConsole using size for its initialwidth and height. It requires Windows 10 1809 or newer, and will returnErrUnsupported if that requirement is not met.
func (*PseudoConsole)Close¶
func (pty *PseudoConsole) Close()error
Close shuts down the pty. The caller must continue reading from theReadCloser returned by Output until either EOF is reached or Close returns;failure to adequately drain the ReadCloser may result in Close deadlocking.
func (*PseudoConsole)ConfigureStartupInfo¶
func (pty *PseudoConsole) ConfigureStartupInfo(sib *winutil.StartupInfoBuilder)error
ConfigureStartupInfo associates pty with the process to be started using sib.
func (*PseudoConsole)InputPipe¶
func (pty *PseudoConsole) InputPipe()io.WriteCloser
InputPipe returns the WriteCloser for writing pty's output.
func (*PseudoConsole)OutputPipe¶
func (pty *PseudoConsole) OutputPipe()io.ReadCloser
OutputPipe returns the ReadCloser for reading pty's output.