Last active
February 16, 2017 10:44
-
-
Save natrim/04a0324ca6898619fad5579ef1facb68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
"os/exec" | |
"path" | |
"path/filepath" | |
) | |
func main() { | |
// get the app path | |
dir, err := filepath.Abs(filepath.Dir(os.Args[0])) | |
if err != nil { | |
println(err.Error()) | |
os.Exit(1) | |
} | |
// execute the real binary with all args | |
cmd := exec.Command(path.Join(dir, "WebCatalog_Real"), os.Args...) | |
out, err := cmd.Output() | |
if err != nil { | |
println(err.Error()) | |
return | |
} | |
// spit out real output | |
print(string(out)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment