commandx

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasBash added in v0.0.2

func HasBash() bool

Types

type CommandResult

type CommandResult struct {
	Stdout  bytes.Buffer
	Stderr  bytes.Buffer
	Status  int
	Success bool
	Err     error
}

func RunBashCommand added in v0.0.2

func RunBashCommand(command string, ops ...Option) *CommandResult

func RunCommand

func RunCommand(command []string, ops ...Option) *CommandResult

func RunCommandForLast

func RunCommandForLast(commands [][]string, ops ...Option) (bool, *CommandResult)

RunCommandForLast run commands and return last result

func (*CommandResult) OutputOrFatal

func (r *CommandResult) OutputOrFatal()

func (*CommandResult) SimpleLog added in v0.0.3

func (r *CommandResult) SimpleLog() string

type Option

type Option func(o *option)

func WithDir

func WithDir(dir string) Option

func WithRedirectStderr added in v0.0.3

func WithRedirectStderr() Option

func WithTimeout added in v0.0.2

func WithTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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