pty

package
v0.0.0-...-c61779d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PTY

type PTY interface {
	Start(c *exec.Cmd, rows, cols int) error
	Close() error
	SetSize(rows, cols int) error
	GetSize() (rows, cols int, err error)
	Read(p []byte) (n int, err error)
	Write(p []byte) (n int, err error)
}

PTY is the interface for pseudoterminal

type UnixPTY

type UnixPTY struct {
	// contains filtered or unexported fields
}

UnixPTY deals with unix pty

func (*UnixPTY) Close

func (pty *UnixPTY) Close() error

Close a unix pty

func (*UnixPTY) GetSize

func (pty *UnixPTY) GetSize() (rows, cols int, err error)

GetSize set the pty size

func (*UnixPTY) Read

func (pty *UnixPTY) Read(p []byte) (n int, err error)

Read implements io.Reader

func (*UnixPTY) SetSize

func (pty *UnixPTY) SetSize(rows, cols int) error

SetSize set the pty size

func (*UnixPTY) Start

func (pty *UnixPTY) Start(c *exec.Cmd, rows, cols int) error

Start a unix pty

func (*UnixPTY) Write

func (pty *UnixPTY) Write(p []byte) (n int, err error)

Write implements io.Reader

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL