I have started to use go modules recently, and I have set GO111MODULE=on. It was unexpected to found that go get does not work outside a module. As an example: $ go get github.com/davecheney/godoc2md go: cannot determine module path for source directory /home/manlio (outside GOPATH, no import comments)
When I used go get inside a module I found that: 1. It saves the downloaded packages in the go mod cache 2. It Installs the command in GOBIN These two points can be also done outside a module. 3. Add an (indirect) entry in the require section in the go.mod file The new entry will, however, be removed by go mod tidy. Is it really necessary that go get must only work inside a module? Thanks Manlio Perillo -- 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.