An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/go-cmd/cmd

Package cmd runs external commands with concurrent access to output and status. It wraps the Go standard library os/exec.Command to correctly handle reading output (STDOUT and STDERR) while a command is running and killing a command. All operations are safe to call from multiple goroutines. A basic example that runs env and prints its output: Commands can be ran synchronously (blocking) or asynchronously (non-blocking): Start returns a channel to which the final Status is sent when the command finishes for any reason. The first example blocks receiving on the channel. The second example is non-blocking because it saves the channel and receives on it later. Only one final status is sent to the channel; use Done for multiple goroutines to wait for the command to finish, then call Status to get the final status.

Ecosystem
proxy.golang.org
Latest Release
v1.4.3
over 1 year ago
Versions
16
Dependent Packages
228
Dependent Repos
1,749
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/go-cmd/cmd
spec
License MIT
Namespace github.com/go-cmd
First Release almost 9 years ago
Last Synced about 13 hours ago
Repository
Stars 995 on GitHub
Forks 132 on GitHub
Docker Dependents 31
Docker Downloads 580,912
Commits 92
Committers 17
Avg per Author 5.412
DDS 0.315
Rankings on proxy.golang.org
Overall Top 1.2%
Dependent packages Top 0.3%
Dependent repos Top 0.2%
Forks Top 2.5%
Docker downloads Top 0.7%