I'm still struggling w/ modules to get my code to compile.  This example is on Win10 using go 1.16.3

~/go/src/rpng/rpng.go

~/go/src/tokenize/tokenize.go

~/go/src/hpcalc2/hpcalc2.go

I'm logged into ~/go/src and I type this, like I used to do in the "old" days:

    go install rpng

Now I get this error: package rpng is not in GOROOT (\Program Files\Go\src\rpng)

I don't understand how to clear the error to get my code to compile.  In each of my directories in ~/go/src, I've run

    go mod init <module name>

Yet the compiler cannot find other bits of code that I've written.

I am able to compile packages/modules in which I do not import anything else that I've written.

Any help would be appreciated.

--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a0757055-dd50-dbd2-642f-8c8634ed39f2%40fastmail.com.

Reply via email to