Skip to content

Instantly share code, notes, and snippets.

@chirino
Created June 13, 2019 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chirino/8e4e60f56e70d932b5cf9ebe739e57ec to your computer and use it in GitHub Desktop.
Save chirino/8e4e60f56e70d932b5cf9ebe739e57ec to your computer and use it in GitHub Desktop.
var mysh = sh.New().
CommandLog(os.Stdout).
CommandLogPrefix("> ").
Env(map[string]string{
"CGO_ENABLED": "0",
"GOOS": "linux",
"GOARCH": "amd64",
}).
Dir("./target")
func run(line string) {
mysh.Line(line).MustExec()
}
func BuildExecutable() {
run(`go build -o myapp github.com/chirino/cmd/myapp`)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment