Skip to content

go-zoox/command

Repository files navigation

Command - Better Cmd for Go

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get -u github.com/go-zoox/command

Getting Started

// 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)
}

License

GoZoox is released under the MIT License.