I can use this out, err := exec.Command("git", "log").Output() to get an output of the command which will run in the same path as the executable location.
out, err := exec.Command("git", "log").Output()
How do I specify in which folder I want to run the command?
2.1m questions
2.1m answers
60 comments
56.9k users