In some of my projects we have code that needs to run external executables, and it’s very difficult to test them, especially when your function is based on some kind of stdout parcing. So how to mock these commands in Go? Let’s check how this goal is achieved in os/exec package. In exec_test.go we can see a helperCommand. When running go tests, the go tool compiles an executable from your code, ru