package exec
import "git.sr.ht/~shulhan/pakakeh.go/lib/os/exec"
Package exec wrap the standar package "os/exec" to simplify calling Run with stdout and stderr.
Index ¶
- func ParseCommandArgs(in string) (cmd string, args []string)
- func Run(command string, stdout, stderr io.Writer) (err error)
Functions ¶
func ParseCommandArgs ¶
ParseCommandArgs parse the input string into command and arguments. This function detect single, double, or back quote on arguments; and escaped spaces using backslash.
func Run ¶
Run the command and arguments in the string cmd. If stdout or stderr is nil, it will default to os.Stdout and/or os.Stderr.
Source Files ¶
- Version
- v0.60.0 (latest)
- Published
- Feb 1, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 14 minutes ago –
Tools for package owners.