I think I missed something in this Dave. Since my directory is already $HOME/go, isn't that what I'd want? Since my path is $HOME/go/...? I found the reference in 1.8 release notes (I would not even have gotten close with a piece of trivia like that!).
I did try to move it to another folder, even though I'm not sure why. I just got different errors. On Thursday, September 20, 2018 at 2:54:27 PM UTC-7, Dave Cheney wrote: > > I think because GOPATH is not set it is defaulting to $HOME/go (see Go 1.9 > release notes, from memory). Try moving your code to another folder. > > > > On Friday, 21 September 2018 05:21:32 UTC+10, John wrote: >> >> Just started playing with modules recently. Having an issue I don't >> understand, wondering if anyone has seen it, the few references to the >> error did not provide anything I saw relevant for what I'm doing. >> >> given a directory structure such as: >> >> <home>/go/ >> src/ >> pkg/ >> bin/ >> >> GOPATH NOT SET >> GO111MODULE = on >> >> If the working directory is: >> <home>/go/src/ >> >> go test ./... >> >> *Results in:* >> go: cannot determine module path for source directory /home/jdoak/go/src >> (outside GOPATH, no import comments) >> >> This also occurs if I do: >> >> go test subdir/subdir/packagedir/... >> >> But it will work if I do: >> >> working directory: <home>/go/src/subdir/subdir/packagedir/ >> >> go test ./... >> >> I'm sure I'm doing something wrong. If someone could enlighten me. >> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.