Op dinsdag 16 februari 2021 om 21:40:52 UTC+1 schreef Ian Lance Taylor:

> On Tue, Feb 16, 2021 at 12:34 PM Peter Kleiweg  wrote: 
> > 
> > `go get` is broken. It doesn't download packages. 
>
> Tell us what you did, what you expected to happen, and what happened 
> instead. Thanks. 
>
> Note that module support is now on by default 
> (https://golang.org/doc/go1.16#go-command), which can affect the 
> behavior of "go get". 
>
> Ian


 Ah, modules are the culprit. When I set `GO111MODULE=auto` everything 
works as it should.

Without `GO111MODULE=auto` :

 - `go get` doesn't download to $GOPATH/src
 - `go build` doesn't work with packages in `$GOPATH/src`

This means you can't use packages that need modification to an unusual 
environment.
Also, you can't use local packages without a dot in the name.

So why would you ever want to *not* set `GO111MODULE=auto` ?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/44245bab-e577-4490-b5f4-02c465a5fae5n%40googlegroups.com.

Reply via email to