Thanks. The comment about tools dependencies was very interesting.
Other package managers, like pipenv for Python, have the concept of dev dependencies. Basically, required packages are divided in two groups: packages and dev-packages: https://pipenv.readthedocs.io/en/latest/basics/#example-pipfile-pipfile-lock Another interesting difference is that pipenv declares how to get packages in the Pipfile, but Go uses the GOPROXY environment variable. The approach used by gobin is a bit too verbose for me: //go:generate gobin -m -run golang.org/x/tools/cmd/stringer -type=Pill Manlio Perillo On Saturday, February 16, 2019 at 2:00:50 PM UTC+1, thepud...@gmail.com wrote: > > The good news is that this is addressed for 1.12: > > #24250 cmd/go: allow "go get" when outside a module in module mode > https://github.com/golang/go/issues/24250 > > It would be worthwhile to try the 1.12 release candidate if you can: > > https://groups.google.com/forum/#!topic/golang-announce/r0R2jijOjBo > > My understanding is that in the lead-up to 1.11, it was a bit debatable > how it should work, so the thinking was that it would be better to first > get some more experience as part of the initial modules experiment in 1.11. > > You can do 'go get' for a binary outside of a module in 1.11, but it is > not as natural as it is in Go 1.12. There are a few options outlined here > in this FAQ (along with some more background, a sample helper script, etc.): > > > https://github.com/golang/go/wiki/Modules#why-does-installing-a-tool-via-go-get-fail-with-error-cannot-find-main-module > > That FAQ is a little broader than your specific question, but you can look > over the 1.11 workarounds listed in that FAQ, which hopefully gives a more > complete description than my quick comment above. > > One option in a particular that is mentioned in that FAQ is > https://github.com/myitcv/gobin, which is a community tool targeting this > area of functionality that many people are using now. 'gobin' has a bit > more flexibility, which you can read about at that repo. > > Regards, > thepudds > > [...] -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.