what are you trying to do? Is your problem related with importing module from
hello. I am trying to save in vsc and also have the ability to use go run.
hmm. What module do you want to import? is it a standard module like
github.com/author/repo 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 example.com, or github.com/user/repo)
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 github.com/go-resty/resty/v2
after the execution of the aforementioned command inside my folder github.com, folder go-resty appears with two other folders inside: resty and email@example.com (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!!!
go mod init [modulename] e.g.
go mod init example.com
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 github.com/go-resty/resty/v2 with respective import name
but in fact it supposed to be
($ go get gopkg.in/go-resty/resty.v2 )