$ go install -helpusage: install [build flags] [packages]
go install github.com/fruit/banana
banana -help
$(go list -f {{.Target}} github.com/fruit/banana) arg1 arg2 ...
go run github.com/fruit/banana arg1 arg2 ...
-j
> go run github.com/fruit/banana arg1 arg2 ...I don't like the idea of giving go run any more powers. It is already being horribly abused.
Your users can perhaps try$ $GOPATH/bin/banana arg1 arg2if properly setting PATH is beyond whatever.
On *nix, many users have $HOME/bin already in $PATH, so using (my setup) export GOPATH=$HOME in .bashrc/.profile solves everything.
I don't like the idea of giving go run any more powers. It is already being horribly abused.I understand the sentiment; it needn't be the run sub-command of course... it's about adding this behaviour to the go command.
A bin util, which would do something similar to your idea
`goexec bin args...` might be smart enough to sort things out
and call for the right binary in the right path,
it is also able to provide detailed information when something wrong happen.
More than that, if a collision happen,
it allows to add precision about the bin to execute until the collision is solved,
something like
`goexec user/bin args...`
`goexec gh.com/user/bin args...`
And to make it awesome, auto completion support would be just awesome! imho.