Re: [go-nuts] "src" folder changed to "pkg"

487 views
Skip to first unread message
Message has been deleted

Ian Lance Taylor

unread,
Sep 13, 2021, 8:39:37 PM9/13/21
to Clitson Belleau, golang-nuts
On Mon, Sep 13, 2021 at 4:35 PM Clitson Belleau <clitso...@gmail.com> wrote:
Hi,

Has anyone had an issue with Go referencing "src" folders from the which was changed to "pkg" since v1.6? If so is there any way to fix this or any link to a similar issue? 

I couldn't find anything in the documentation regarding this. I am running the latest v1.17.1 release.

fig1.png
The folder listing for my GOPATH:
fig2.png


When presenting text, please present it as ordinary text, not as images.  Text is much easier to read than images.  Thanks.

You should not have a directory $GOROOT/src/github.com.  I don't know why that appears to exist on your system.

Ian
Message has been deleted

Anderson Queiroz

unread,
Sep 15, 2021, 3:56:51 AM9/15/21
to golang-nuts
If I'm not mistaken `$GOPATH/pkg/mod` where go modules keeps the downloaded modules, looking up `$GOPATH/pkg/mod` is to look for a module downloaded in module aware mode and `$GOPATH/src` is for gopath mode.

Are you working with go modules or on the legacy go path mode?

On Tuesday, 14 September 2021 at 04:22:52 UTC+2 clitso...@gmail.com wrote:
Noted with thanks.

I used "go get ." to download the package "github.com/google/gopacket", however Go is searching for it in "$GOPATH/src" while it was downloaded to "$GOPATH/pkg/mod".

--
Clitson

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages