package misc import ( "os" "os/exec" ) func GoBuild() error { cmd := exec.Command("go", "build", "-ldflags", "\"-w-s\"", "-trimpath", "path/to/main.go", "-o", "main") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr cmd.Stdin = os.Stdin return cmd.Run() }