ptexec

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 New added in v0.4.0

func New() *PseudoTerminal

New creates a new pseudo terminal builder

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳