command

package
v0.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Stdout   string
	Stderr   string
	ExitCode int
	Err      error
}

Result holds the result of a command execution

func (Result) String

func (r Result) String() string

String returns a formatted string of the command result

type Runner

type Runner struct {
	ColorOutput bool
}

Runner provides command execution with optional colored output

func NewCommandRunner

func NewCommandRunner(colorOutput bool) *Runner

NewCommandRunner creates a new CommandRunner

func (*Runner) Debugf

func (c *Runner) Debugf(format string, args ...interface{})

func (*Runner) Errorf

func (c *Runner) Errorf(format string, args ...interface{})

func (*Runner) Infof

func (c *Runner) Infof(format string, args ...interface{})

func (*Runner) RunCommand

func (c *Runner) RunCommand(name string, args ...string) Result

RunCommand executes a command and returns the result

func (*Runner) RunCommandQuiet

func (c *Runner) RunCommandQuiet(name string, args ...string) Result

RunCommandQuiet executes a command without output streaming

Jump to

Keyboard shortcuts

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