type gitRunner … // newCmdRunner returns a gitRunner if it can find the binary. // It also creats a temp directory for cloning repos. func newCmdRunner(timeout time.Duration) (*gitRunner, error) { … } // run a command with a timeout. func (r gitRunner) run(args ...string) error { … }