[go-nuts] Re: idiomatic code to find, if executable exists in golang

2018-09-26 Thread Dave Cheney
My suggestion is, rather than seeing if an executable exists, then executing it. Just execute it and if there is an error just pass it back to the caller. The difference between I tried to run the program but it wasn’t found and I tried to run the program but it failed for some reason shouldn’t

[go-nuts] Re: idiomatic code to find, if executable exists in golang

2018-09-26 Thread Nilsocket
On Wednesday, September 26, 2018 at 1:16:51 PM UTC+5:30, Dave Cheney wrote: > > Are you able to modify the original question. Why do you need to know if a > binary exists? Presumably so you can execute it. If so then you can modify > the original request and make the problem more tractable.