cmdutil

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorCodeCmd string = "CMD_ERROR"

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Output() string
	Error() string
	Start() error
	Wait() error
	Print(fns ...PrintFunc)
	String() string
	ExitCode() int
}

func New

func New(bin string, args []string, opts ...Option) Command

type Option

type Option func(*cmd)

func Async

func Async() Option

func WithContext

func WithContext(ctx context.Context) Option

func WithEnv

func WithEnv(envs ...string) Option

func WithInput

func WithInput(inputs ...io.Reader) Option

type PrintFunc

type PrintFunc func(line string)

Jump to

Keyboard shortcuts

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