github.com/myitcv/gobin
github.com/myitcv/gobin is an experimental, module-aware command to install/run main packages.
Compared to the Go 1.11 series cmd/go, with gobin you:
- get some of the behaviour of
go get,go installandgo runcombined - can have multiple versions of a tool available without needing to worry about setting
PATH - have the equivalent of
go getwhilst in module-aware mode but this does not modify yourgo.mod; indeed you can choose whether you want to run in global mode (the default) or main-module mode for the install/run operation - can run a main package without the overhead of the linking phase, e.g. within code generation
More detailed on the rationale etc are covered in the main
README and the
FAQ.
gobin is an experiment, as such there are no expectations over its future.
There are a number of potential outcomes, not limited to the following list:
- it dies; the hypothesis being tested by
gobinproves incorrect, unworkable etc - it lives on as a separate tool outside of the Go distribution
- parts of
gobinare absorbed into thecmd/gotool - a variant of gobin is vendored and distributed alongside the
cmd/gotool, much likegodocwas in in Go 1.11 and earlier - …
As ever, contributions in the form of feedback, issues and PRs, greatly appreciated.