I'm trying to check to see if a shell binary exists on the machine via Go.
I have tried some simpler shell based commands:
args := []string{"-x", "fly"}
o, err := exec.Command("test", args...).Output()
fmt.Println(err)
fmt.Println(o)
But this has an exit of 1 no matter what and outputs nothing.
I'm wondering if there is something in Go itself that would have this functionality as obviously I'd rather do the heavy lifting with go itself.
Thanks!