github.com/myitcv/gobin is an experimental, module-aware command to install/run main packages.
Compared to the Go 1.11 series
- get some of the behaviour of
- can have multiple versions of a tool available without needing to worry about setting
- have the equivalent of
go getwhilst in module-aware mode but this does not modify your
go.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
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 the
- a variant of gobin is vendored and distributed alongside the
cmd/gotool, much like
godocwas in in Go 1.11 and earlier
As ever, contributions in the form of feedback, issues and PRs, greatly appreciated.