To install the package, run:
go get -u github.com/go-zoox/command
// hello world
cmd := &command.Command{
Script: `echo "hello world"`,
}
if err := cmd.Run(); err != nil {
log.Fatal("Failed to run command: %s", err)
}
// multiline scripts
cmd := &Command{
Script: `
echo 1
echo 2
echo 3
`,
}
if err := cmd.Run(); err != nil {
log.Fatal("Failed to run command: %s", err)
}
GoZoox is released under the MIT License.