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

command

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForkArgs

type ForkArgs struct {
	// required
	Log     logger.Logger
	Command string

	// optional
	Context             context.Context
	Args                []string
	Cwd                 string
	BaseDir             string // the base director to upload if different than dir
	Dir                 string // the directory to store logs in
	LogFilenameLabel    string
	SaveLogs            bool
	Env                 []string
	SkipBundleOnSuccess bool
	WriteToStd          bool
}

type ForkResult

type ForkResult struct {
	Duration       time.Duration
	LastErrorLines string
	ProcessState   *os.ProcessState
	LogFileBundle  string
}

func Fork

func Fork(args ForkArgs) (*ForkResult, error)

Fork will run a command on the current binary

func (*ForkResult) String

func (r *ForkResult) String() string

type Uploader

type Uploader func(ctx context.Context, log logger.Logger, file string) (string, error)

Jump to

Keyboard shortcuts

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