Help us shape the future of Go! Take the 2026 Go Developer Survey

pkg

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd added in v0.8.0

func Cmd(ctx context.Context, ioStreams *IO, cmd, dir string, args ...string) *exec.Cmd

Cmd return a [cmd.CommandContext] running cmd with args in dir, wiring in/out/errW directly to the subprocess. When out/errW are *os.File (e.g. os.Stdout), the file descriptor is passed through so the subprocess sees a real TTY and can emit colors.

func RunInteractive added in v0.7.2

func RunInteractive(ctx context.Context, ioStreams *IO, cmd, dir string, args ...string) error

RunInteractive runs cmd with args in dir. See Cmd.

Types

type IO added in v0.8.0

type IO struct {
	In  io.Reader
	Out io.Writer
	Err io.Writer
}

IO holds the standard streams used for interactive subprocess operations.

Jump to

Keyboard shortcuts

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