command

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShellProcess

type ShellProcess struct {
	Command         string
	StripNewlines   bool
	ReturnErrOutput bool
	Timeout         int // in seconds
}

ShellProcess wraps a shell command execution

func NewShellProcess

func NewShellProcess(command string, timeout int) *ShellProcess

NewShellProcess creates a new ShellProcess

func (*ShellProcess) Exec

func (s *ShellProcess) Exec(commands string) (string, error)

Exec runs the commands and returns the output

func (*ShellProcess) Run

func (s *ShellProcess) Run(args string) (string, error)

Run executes the command with the given arguments

Jump to

Keyboard shortcuts

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