Documentation ¶ Index ¶ Constants func Run(cmd *exec.Cmd, errMsg string) error func RunCmd(exePath string, workDir string, args ...string) (int, error) type Go func NewGo(workDir string) (Go, error) func (g Go) Build(args ...string) error func (g Go) Fmt(args ...string) error func (g Go) NewCmd(action string, args ...string) *exec.Cmd func (g Go) Test(args ...string) error func (g Go) Vet(args ...string) error Constants ¶ View Source const ( EXIT_OK = 0 // Zero exit code EXIT_BAD = 1 // General error exit code ) Variables ¶ This section is empty. Functions ¶ func Run ¶ func Run(cmd *exec.Cmd, errMsg string) error func RunCmd ¶ func RunCmd(exePath string, workDir string, args ...string) (int, error) Run runs the executable at 'exePath'. Setting the 'workDir' as empty will use the default as specified by functions that accept exec.Cmd. EXIT_OK is returned on successful execution otherwise EXIT_BAD or another non-zero exit code is returned. Types ¶ type Go ¶ type Go struct { Path string WorkDir string } Go represents a wrapper to the Go compiler. Functionality is provided for building, formatting, and testing. func NewGo ¶ func NewGo(workDir string) (Go, error) NewGo returns a new Go struct. 'workDir' may be empty to signify the current working directory should be used. func (Go) Build ¶ func (g Go) Build(args ...string) error func (Go) Fmt ¶ func (g Go) Fmt(args ...string) error func (Go) NewCmd ¶ func (g Go) NewCmd(action string, args ...string) *exec.Cmd func (Go) Test ¶ func (g Go) Test(args ...string) error func (Go) Vet ¶ func (g Go) Vet(args ...string) error Source Files ¶ View all Source files go.go run.go Click to show internal directories. Click to hide internal directories.