Documentation
¶
Index ¶
- type PseudoTerminal
- func (c *PseudoTerminal) Cols(cols uint16) *PseudoTerminal
- func (c *PseudoTerminal) Command(name string, args ...string) *PseudoTerminal
- func (c *PseudoTerminal) Rows(rows uint16) *PseudoTerminal
- func (c *PseudoTerminal) Run() ([]byte, error)
- func (c *PseudoTerminal) Stdout(stdout io.Writer) *PseudoTerminal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PseudoTerminal ¶ added in v0.4.0
type PseudoTerminal struct {
// contains filtered or unexported fields
}
PseudoTerminal defines the setup for a command to be run in a pseudo terminal, e.g. terminal size, or output settings
func (*PseudoTerminal) Cols ¶ added in v0.4.0
func (c *PseudoTerminal) Cols(cols uint16) *PseudoTerminal
Cols sets the width/columns for the pseudo terminal
func (*PseudoTerminal) Command ¶ added in v0.4.0
func (c *PseudoTerminal) Command(name string, args ...string) *PseudoTerminal
Command sets the command and arguments to be used
func (*PseudoTerminal) Rows ¶ added in v0.4.0
func (c *PseudoTerminal) Rows(rows uint16) *PseudoTerminal
Rows sets the lines/rows for the pseudo terminal
func (*PseudoTerminal) Run ¶ added in v0.4.0
func (c *PseudoTerminal) Run() ([]byte, error)
Run runs the provided command/script with the given arguments in a pseudo terminal (PTY) so that the behavior is the same if it would be executed in a terminal
func (*PseudoTerminal) Stdout ¶ added in v0.4.0
func (c *PseudoTerminal) Stdout(stdout io.Writer) *PseudoTerminal
Stdout sets the writer to be used for the standard output
Click to show internal directories.
Click to hide internal directories.