No module path for go.mod file..HELP


what are you trying to do? Is your problem related with importing module from file://path/to/somewhere?

hello. I am trying to save in vsc and also have the ability to use go run.image.png

hmm. What module do you want to import? is it a standard module like or something else? could you post code.
maybe try to run something like go mod tidy

I’m able to reproduce this behavior.
it looks like your go.mod file (module info file in root of your project) exists, but is empty.
pleas remove it and create by go mod init [modulename]
instead of [modulename] put whatever you want (like, or

1 Like

Ok, thanks so much!!

Hello, I am not completely sure but I think my question is in line with the topic. Basically i am trying to import resty module by $go get -v

after the execution of the aforementioned command inside my folder, folder go-resty appears with two other folders inside: resty and resty@v1.12.0 (go/pkg/mod/go-resty/…)

So it looks like the module is being imported but when i run my .go file following error occurs:

the same error when running go install main.go and go build main.go

Would love to hear any suggestions. Thank you much!!!

try go mod init [modulename] e.g. go mod init
and go mod tidy

Thank you @gucio321! I have actually tried all of the above to no avail. After two days of fighting with this package finally i figured out that the issues was in the name. On their official github documentation it says

module with respective import name

but in fact it supposed to be

($ go get )

import “”

Here is the link to the where i found it.
Hope it will help someone. Thanks again for your response @gucio321

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