Modules problem with Go 1.11 beta 3

macOS 10.13.6
Golang 1.11 beta 3

Hello, I’ve just found an intriguing library at Following the instructions, I typed the command go get Rather than copying new files under my src/ folder as I would expect, this resulted in the following folders being created…

Okay, clearly this is the “Modules” thing doing its thing, I thought.

So I then created a test go app, outside of my GOPATH, since this is allowed with “Modules”.

I put it in ~/code/go/test/govcl. I also created a .mod file by typing go mod init

This created a .mod file with the following contents…


However, when I try to build the app with go run main.go I get the following error message…

└─❱❱❱ go run main.go                                                                                                                             +913 11:04 ❰─┘
go: finding latest
go: import "": cannot find module providing package

I’ve checked and the folder go/pkg/mod/ is there. Do I need to amend my go.mod file to take account of the version information? I would have expected Go to take care of these kinds of details. It’s certainly not as painless as I would have hoped unless I’m missing something very obvious.

Can anyone shed some light on this? Thanks!

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