How can i change directory of exec command on Windows ?
This code working byt this is go app working directory:
result, _ := exec.Command("cmd", "/C", "git", "status").Output()
When I want to change path then result always is empty string
result, _ := exec.Command("cmd", "/C", "cd", "C:\\Folder\\example", "git", "status").Output()
In php on Linux i use exec command like this:
exec('cd /var/www/example/ && git status', $res);
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.