#go not able to find modules?

2 messages · Page 1 of 1 (latest)

true marsh
#

I have found a way to get my code to compile:

  • set GOPATH to /d/projects/ (my project is located in /d/projects/src/test/test-goproj)
  • import "test/test-goproj/data" at the top of main.go

But this seems incredibly impractical to have to set these env variables to run my go program?

polar yacht
#

dont set GOPATH to anything and use go module instead.