Go get not fetching package

I’m using go1.13 with a GOPATH defined and $GO111MODULE still set to auto.

I wrote a new program with an import referring a package on github (e.g. github.com/toto/thing).

According to the documentation (go help get), I expect the command “go get” would download the package from github. But it doesn’t. It does find the import path in the source, but say that it can’t locate the package in $GOROOT/src or $GOPATH/src.

So far I always executed “go get github.com/toto/thing” by specifying the import path explicitly.

Why doesn’t go get fetch the package from the network ?

Calling “go get …” yields the same result, but takes much more time.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.