script

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const EnvVarHome = "HOME"
View Source
const EnvVarTMP = "TMP"

Variables

View Source
var ErrorForceKill = errors.New("force killed failed")

Functions

func IsWindows

func IsWindows() bool

Types

type CmdOutput

type CmdOutput struct {
	Stdout *bytes.Buffer
	Stderr *bytes.Buffer
}

func Exec

func Exec(opt *Options) (*CmdOutput, error)

type Options

type Options struct {
	CancelCtx  context.Context
	Command    string
	CliArgs    []string
	BinPath    string
	Env        map[string]string
	ErrWriter  io.Writer
	Stdin      io.Reader
	WorkingDir string
}

Jump to

Keyboard shortcuts

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